Fake lights! Yay!
This commit is contained in:
@@ -183,6 +183,26 @@
|
||||
<Processor>FontDescriptionProcessor</Processor>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="shaders\LightEffect.fx">
|
||||
<Name>LightEffect</Name>
|
||||
<Importer>EffectImporter</Importer>
|
||||
<Processor>EffectProcessor</Processor>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<Compile Include="images\lights\point.png">
|
||||
<Name>point</Name>
|
||||
<Importer>TextureImporter</Importer>
|
||||
<Processor>TextureProcessor</Processor>
|
||||
</Compile>
|
||||
<Compile Include="images\lights\spot.png">
|
||||
<Name>spot</Name>
|
||||
<Importer>TextureImporter</Importer>
|
||||
<Processor>TextureProcessor</Processor>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 31 KiB |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
+31
@@ -0,0 +1,31 @@
|
||||
texture LightsTexture;
|
||||
|
||||
sampler ColorSampler : register(s0);
|
||||
|
||||
sampler LightsSampler = sampler_state{
|
||||
Texture = <LightsTexture>;
|
||||
};
|
||||
|
||||
struct VertexShaderOutput
|
||||
{
|
||||
float4 Position : POSITION0;
|
||||
float2 TexCoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
float4 PixelShaderFunction(VertexShaderOutput input) : COLOR0
|
||||
{
|
||||
float2 tex = input.TexCoord;
|
||||
|
||||
float4 color = tex2D(ColorSampler, tex);
|
||||
float4 alpha = tex2D(LightsSampler, tex);
|
||||
|
||||
return color * alpha;
|
||||
}
|
||||
|
||||
technique Technique1
|
||||
{
|
||||
pass Pass1
|
||||
{
|
||||
PixelShader = compile ps_2_0 PixelShaderFunction();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user