noisemap tweaks and cleanup.

This commit is contained in:
Shyotl
2017-03-27 23:13:56 -05:00
parent f1063afea1
commit 97a6f3a7b2
13 changed files with 25 additions and 46 deletions

View File

@@ -65,6 +65,7 @@ uniform float size;
VARYING vec4 vary_fragcoord;
uniform mat4 inv_proj;
uniform vec2 noise_scale;
vec2 encode_normal(vec3 n)
@@ -225,7 +226,7 @@ void main()
vec3 diff_tex = texture2D(diffuseRect, frag.xy).rgb;
vec3 dlit = vec3(0, 0, 0);
float noise = texture2D(noiseMap, frag.xy/128.0).b;
float noise = texture2D(noiseMap, frag.xy*noise_scale).b;
if (proj_tc.z > 0.0 &&
proj_tc.x < 1.0 &&
proj_tc.y < 1.0 &&

View File

@@ -65,6 +65,7 @@ VARYING vec3 trans_center;
VARYING vec4 vary_fragcoord;
uniform mat4 inv_proj;
uniform vec2 noise_scale;
vec2 encode_normal(vec3 n)
{
@@ -228,7 +229,7 @@ void main()
vec4 spec = texture2D(specularRect, frag.xy);
float noise = texture2D(noiseMap, frag.xy/128.0).b; // This is probably wrong
float noise = texture2D(noiseMap, frag.xy*noise_scale).b;
vec3 dlit = vec3(0, 0, 0);
if (proj_tc.z > 0.0 &&