Files
LuaCsForBarotraumaEP/Barotrauma/BarotraumaShared/Content/losshader.fx
T
Juan Pablo Arce 5c2872c1e1 Separate versions of each shader are now more easily available for compilation
TODO: write up some way to share shader code and use platform-specific features
2017-12-31 19:04:04 -03:00

25 lines
655 B
HLSL

Texture2D xTexture;
sampler TextureSampler : register (s0) = sampler_state { Texture = <xTexture>; };
Texture2D xLosTexture;
sampler LosSampler = sampler_state { Texture = <xLosTexture>; };
float4 main(float4 position : SV_Position, float4 color : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
{
float4 losColor = xLosTexture.Sample(LosSampler, texCoord);
float4 sample = xTexture.Sample(TextureSampler, texCoord);
float4 outColor = float4(sample.x*losColor.x, sample.y*losColor.x, sample.z*losColor.x, losColor.x);
return outColor;
}
technique LosShader
{
pass Pass1
{
PixelShader = compile ps_4_0_level_9_1 main();
}
}