Guest User

Untitled

a guest
Feb 21st, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.70 KB | None | 0 0
  1. texture lightMask;
  2. sampler mainSampler : register(s0);
  3. sampler lightSampler = sampler_state{Texture = lightMask;};
  4.  
  5. struct PixelShaderInput
  6. {
  7.     float4 TextureCoords: TEXCOORD0;
  8. };
  9.  
  10. float4 PixelShaderFunction(PixelShaderInput input) : COLOR0
  11. {
  12.     float2 texCoord = input.TextureCoords;
  13.  
  14.     float4 mainColor = tex2D(mainSampler, texCoord);
  15.     float4 lightColor = tex2D(lightSampler, texCoord);
  16.  
  17.     return mainColor * lightColor;
  18. }
  19.  
  20. technique Technique1
  21. {
  22.     pass Pass1
  23.     {
  24.         PixelShader = compile ps_2_0 PixelShaderFunction();
  25.     }
  26. }
  27.  
  28.  
  29. (3): ID3DXEffectCompiler: State 'TEXTURE' does not accept 'lightMask' as a value
  30. ID3DXEffectCompiler: There was an error initializing the compiler
Add Comment
Please, Sign In to add comment