summaryrefslogtreecommitdiff
path: root/editor/plugins/editor_preview_plugins.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-08-10 07:41:46 +0200
committerGitHub <noreply@github.com>2021-08-10 07:41:46 +0200
commit536950f9f35f48633c6c2c57ae2473bb906221d2 (patch)
tree659cb6a83ab8f4d76ae3b11486987c51825a849e /editor/plugins/editor_preview_plugins.cpp
parentf3ddc14d3829ed09d6eab81811bcfb1314626ddf (diff)
parent430ad75963a0e6837ef460e78fb99565714b4418 (diff)
Merge pull request #21922 from aaronfranke/double
Some work on double-precision support
Diffstat (limited to 'editor/plugins/editor_preview_plugins.cpp')
-rw-r--r--editor/plugins/editor_preview_plugins.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp
index d7618b973e..d47bd2d410 100644
--- a/editor/plugins/editor_preview_plugins.cpp
+++ b/editor/plugins/editor_preview_plugins.cpp
@@ -386,7 +386,7 @@ EditorMaterialPreviewPlugin::EditorMaterialPreviewPlugin() {
Vector<Vector3> vertices;
Vector<Vector3> normals;
Vector<Vector2> uvs;
- Vector<float> tangents;
+ Vector<real_t> tangents;
Basis tt = Basis(Vector3(0, 1, 0), Math_PI * 0.5);
for (int i = 1; i <= lats; i++) {
@@ -635,7 +635,7 @@ Ref<Texture2D> EditorAudioStreamPreviewPlugin::generate(const RES &p_from, const
Ref<AudioStreamPlayback> playback = stream->instance_playback();
ERR_FAIL_COND_V(playback.is_null(), Ref<Texture2D>());
- float len_s = stream->get_length();
+ real_t len_s = stream->get_length();
if (len_s == 0) {
len_s = 60; //one minute audio if no length specified
}
@@ -649,8 +649,8 @@ Ref<Texture2D> EditorAudioStreamPreviewPlugin::generate(const RES &p_from, const
playback->stop();
for (int i = 0; i < w; i++) {
- float max = -1000;
- float min = 1000;
+ real_t max = -1000;
+ real_t min = 1000;
int from = uint64_t(i) * frame_length / w;
int to = (uint64_t(i) + 1) * frame_length / w;
to = MIN(to, frame_length);