Commit d89e2a3e authored by amandaghassaei's avatar amandaghassaei

translational shader update

parent e504b547
This diff is collapsed.
......@@ -5,13 +5,13 @@ uniform float u_dt;
uniform sampler2D u_velocity;
uniform sampler2D u_lastTranslation;
uniform sampler2D u_fixed;
uniform sampler2D u_mass;
void main(){
vec2 fragCoord = gl_FragCoord.xy;
vec2 scaledFragCoord = fragCoord/u_textureDim;
float isFixed = texture2D(u_fixed, scaledFragCoord).x;
float isFixed = texture2D(u_mass, scaledFragCoord).y;
if (isFixed < 0.0 || isFixed == 1.0){//no cell or is fixed
gl_FragColor = vec4(0, 0, 0, 0);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment