Skip to content

Commit

Permalink
Effect: Removed the cube in 2020.4.0 also.
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaiVChr committed Jan 7, 2023
1 parent d91e944 commit be336be
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
22 changes: 11 additions & 11 deletions Shaders4/model-interior-ALS-base.frag
Original file line number Diff line number Diff line change
Expand Up @@ -123,26 +123,26 @@ void main()
n = normalize(n);

// lookup on the opacity map
vec3 light_vec = normalize((gl_ModelViewMatrixInverse * gl_LightSource[0].position).xyz);
//vec3 light_vec = normalize((gl_ModelViewMatrixInverse * gl_LightSource[0].position).xyz);
//vec3 light_vec = vec3 (-1.0,0.0,0.0);

vec4 ep = gl_ModelViewMatrixInverse * vec4(0.0,0.0,0.0,1.0);
vec3 scaled_pos = relPos + ep.xyz;
//vec3 scaled_pos = relPos + ep.xyz;

//vec3 lookup_vec = normalize(- normalize(light_vec) + relPos);
scaled_pos -= offset_vec;
float rangle = radians(angle);
mat2 rotMat = mat2 (cos(rangle), -sin(rangle), sin(rangle), cos(rangle));
scaled_pos.xy *=rotMat;
//scaled_pos -= offset_vec;
//float rangle = radians(angle);
//mat2 rotMat = mat2 (cos(rangle), -sin(rangle), sin(rangle), cos(rangle));
//scaled_pos.xy *=rotMat;

scaled_pos /= scale_vec;
//scaled_pos /= scale_vec;

//vec3 lookup_pos = dot(base1,scaled_pos) * base1 + dot(base2,scaled_pos) * base2;
vec3 lookup_pos = scaled_pos - light_vec * dot(light_vec, scaled_pos);
//vec3 lookup_pos = scaled_pos - light_vec * dot(light_vec, scaled_pos);

vec3 lookup_vec = normalize(normalize(light_vec) + lookup_pos);
vec4 opacity = textureCube(cube_texture, lookup_vec);

//vec3 lookup_vec = normalize(normalize(light_vec) + lookup_pos);
//vec4 opacity = textureCube(cube_texture, lookup_vec);
vec4 opacity = vec4(1.0,1.0,1.0,1.0);

vec4 diffuse = diffuse_term;
NdotL = dot(n, lightDir);
Expand Down
22 changes: 11 additions & 11 deletions Shaders4/model-interior-ALS-detailed.frag
Original file line number Diff line number Diff line change
Expand Up @@ -138,26 +138,26 @@ void main()
n = normalize(n);

// lookup on the opacity map
vec3 light_vec = normalize((gl_ModelViewMatrixInverse * gl_LightSource[0].position).xyz);
//vec3 light_vec = normalize((gl_ModelViewMatrixInverse * gl_LightSource[0].position).xyz);
//vec3 light_vec = vec3 (-1.0,0.0,0.0);

vec4 ep = gl_ModelViewMatrixInverse * vec4(0.0,0.0,0.0,1.0);
vec3 scaled_pos = relPos + ep.xyz;
//vec3 scaled_pos = relPos + ep.xyz;

//vec3 lookup_vec = normalize(- normalize(light_vec) + relPos);
scaled_pos -= offset_vec;
float rangle = radians(angle);
mat2 rotMat = mat2 (cos(rangle), -sin(rangle), sin(rangle), cos(rangle));
scaled_pos.xy *=rotMat;
//scaled_pos -= offset_vec;
//float rangle = radians(angle);
//mat2 rotMat = mat2 (cos(rangle), -sin(rangle), sin(rangle), cos(rangle));
//scaled_pos.xy *=rotMat;

scaled_pos /= scale_vec;
//scaled_pos /= scale_vec;

//vec3 lookup_pos = dot(base1,scaled_pos) * base1 + dot(base2,scaled_pos) * base2;
vec3 lookup_pos = scaled_pos - light_vec * dot(light_vec, scaled_pos);
//vec3 lookup_pos = scaled_pos - light_vec * dot(light_vec, scaled_pos);

vec3 lookup_vec = normalize(normalize(light_vec) + lookup_pos);
vec4 opacity = textureCube(cube_texture, lookup_vec);

//vec3 lookup_vec = normalize(normalize(light_vec) + lookup_pos);
//vec4 opacity = textureCube(cube_texture, lookup_vec);
vec4 opacity = vec4(1.0,1.0,1.0,1.0);

vec4 diffuse = diffuse_term;
NdotL = dot(n, lightDir);
Expand Down

0 comments on commit be336be

Please sign in to comment.