Changeset 861 for GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/media
- Timestamp:
- 04/28/06 19:49:56 (19 years ago)
- Location:
- GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/media
- Files:
-
- 186 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/media/general/indirectTexturingDefault_FP20.cg
r821 r861 6 6 uniform float epsilonY, 7 7 uniform float sourceTextureSize, 8 uniform float numSamples, 9 uniform float sqrtNumSamples, 8 10 out float4 ocolor: COLOR) 9 11 { 10 12 ocolor = float4(0.0, 0.0, 0.0, 0.0); 11 13 float2 epsilon = float2(epsilonX, epsilonY); 14 float4 value = tex2D(indirectTexture, subTexCoord).xyzw; 15 float2 coords = float2(0.0, 1.0) - abs(texCoord - ( value.xy - epsilon ) ); 12 16 13 float2 coords = float2(0.0, 1.0) - abs(texCoord - ( tex2D(indirectTexture, subTexCoord).xy - epsilon ) ); 14 15 if (tex2D(indirectTexture, subTexCoord).z != 0.0) 16 { 17 ocolor = float4(tex2D(sourceTexture, coords * sourceTextureSize).xyzw); 17 if (value.z != 0.0) 18 { 19 float2 newcoord = value.zw + ((coords * sourceTextureSize) / sqrtNumSamples); 20 ocolor = float4(tex2D(sourceTexture, newcoord).xyzw); 18 21 } 19 22 } 20 -
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/media/general/indirectTexturingDefault_glsl_FP20.shd
r821 r861 4 4 uniform float epsilonY; 5 5 uniform float sourceTextureSize; 6 uniform float numSamples; 7 uniform float sqrtNumSamples; 6 8 7 9 void main(void) … … 11 13 vec2 texCoord = gl_TexCoord[0].xy; 12 14 vec2 subTexCoord = gl_TexCoord[1].xy; 13 vec2 coords = vec2(0.0, 1.0) - abs(texCoord - ( texture2D(indirectTexture, subTexCoord ).xy - epsilon ) ); 15 vec4 value = texture2D(indirectTexture, subTexCoord).xyzw; 16 vec2 coords = vec2(0.0, 1.0) - abs(texCoord - ( value.xy - epsilon ) ); 14 17 15 if ( texture2D(indirectTexture, subTexCoord).z != 0.0)18 if (value.z != 0.0) 16 19 { 17 ocolor = texture2D(sourceTexture, coords * sourceTextureSize).xyzw; 20 vec2 newcoord = value.zw + ((coords * sourceTextureSize) / sqrtNumSamples); 21 ocolor = vec4(texture2D(sourceTexture, newcoord).xyzw); 18 22 } 19 20 23 gl_FragColor = ocolor; 21 24 } -
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/media/general/indirectTexturingDefault_hlsl_FP20.shd
r821 r861 5 5 uniform float epsilonY; 6 6 uniform float sourceTextureSize; 7 uniform float numSamples; 8 uniform float sqrtNumSamples; 7 9 8 10 float4 main_fp(float2 texCoord: TEXCOORD0, … … 11 13 float4 ocolor = float4(0.0, 0.0, 0.0, 0.0); 12 14 float2 epsilon = float2(epsilonX, epsilonY); 15 float4 value = tex2D(indirectTexture, subTexCoord).xyzw; 16 float2 coords = float2(0.0, 1.0) - abs(texCoord - ( value.xy - epsilon ) ); 13 17 14 float2 coords = float2(0.0, 1.0) - abs(texCoord - ( tex2D(indirectTexture, subTexCoord).xy - epsilon ) ); 15 16 if (tex2D(indirectTexture, subTexCoord).z != 0.0) 17 { 18 ocolor = float4(tex2D(sourceTexture, coords * sourceTextureSize).xyzw); 18 if (value.w != 0.0) 19 { 20 float2 newcoord = value.zw + ((coords * sourceTextureSize) / sqrtNumSamples); 21 ocolor = float4(tex2D(sourceTexture, newcoord).xyzw); 19 22 } 20 23 21 24 return ocolor; 22 25 } 23 -
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/media/general/indirectTexturingPointBasedGeneration_FP20.cg
r786 r861 1 1 void main(float4 colour: COLOR0, 2 uniform float textureSize,2 float4 texCoord: TEXCOORD0, 3 3 out float4 ocolor: COLOR) 4 4 { 5 ocolor = float4(0.0, 0.0, 1.0 - (1.0/textureSize), 1.0 - (1.0/textureSize));5 ocolor = float4(0.0, 0.0, texCoord.xy); 6 6 }
Note: See TracChangeset
for help on using the changeset viewer.