Last active
August 29, 2015 14:00
-
-
Save hiko9lock/11342282 to your computer and use it in GitHub Desktop.
ShaderFX Custom Code sample for Maya 2015, maya LT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct CustomCode1245Output | |
{ | |
float3 color; | |
}; | |
CustomCode1245Output CustomCode1245Func( float2 UV ) | |
{ | |
CustomCode1245Output OUT; | |
float3 output= float3(0.0, 0.0, 0.0); | |
float dist= 0.004; | |
int radius= 4; | |
for( int i= -radius; i< radius; i++ ) { | |
for( int j= -radius; j< radius; j++ ) { | |
output+= tex2D( SFX_SAMPLER0, UV+float2(i*dist, j*dist)).xyz; | |
} | |
} | |
OUT.color= (output/((radius+1)*(radius+1))); | |
return OUT; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment