Explorar el Código

Improved consistency between vector field texture and world space

Andreas Raddau hace 2 años
padre
commit
a5828cd0e3
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      servers/rendering/renderer_rd/shaders/particles.glsl

+ 1 - 1
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);