summaryrefslogtreecommitdiff
path: root/servers/rendering/renderer_rd
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-11-11 21:05:00 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-11-11 21:05:00 +0100
commitc41b9c5f5b80e9e1ced37e6c8d12c147601ab9f6 (patch)
treeb9f3cc5a2b9fd0e41375bd70c99703ab974e52df /servers/rendering/renderer_rd
parent15a379547ea59f25f0a730608dfd82056451605b (diff)
parenta5828cd0e3189a24809538b75ac95c50dcc6ea4d (diff)
Merge pull request #67972 from and-rad/vector-field-consistency
Fix inconsistency between vector field texture and world space directions
Diffstat (limited to 'servers/rendering/renderer_rd')
-rw-r--r--servers/rendering/renderer_rd/shaders/particles.glsl2
1 files changed, 1 insertions, 1 deletions
diff --git a/servers/rendering/renderer_rd/shaders/particles.glsl b/servers/rendering/renderer_rd/shaders/particles.glsl
index 3a6dd579b9..9f6aa7adc0 100644
--- a/servers/rendering/renderer_rd/shaders/particles.glsl
+++ b/servers/rendering/renderer_rd/shaders/particles.glsl
@@ -462,7 +462,7 @@ void main() {
if (any(lessThan(uvw_pos, vec3(0.0))) || any(greaterThan(uvw_pos, vec3(1.0)))) {
continue;
}
- vec3 s = texture(sampler3D(sdf_vec_textures[FRAME.attractors[i].texture_index], material_samplers[SAMPLER_LINEAR_CLAMP]), uvw_pos).xyz * 2.0 - 1.0;
+ vec3 s = texture(sampler3D(sdf_vec_textures[FRAME.attractors[i].texture_index], material_samplers[SAMPLER_LINEAR_CLAMP]), uvw_pos).xyz * -2.0 + 1.0;
dir = mat3(FRAME.attractors[i].transform) * safe_normalize(s); //revert direction
amount = length(s);