Lighting improvements: lightmap is drawn over all structures and blurred, flashlight item, OnContained statuseffects are also applied when the item is contained in a characterinventory
This commit is contained in:
@@ -37,3 +37,9 @@
|
||||
/processorParam:DebugMode=Auto
|
||||
/build:watershader.fx
|
||||
|
||||
#begin blurshader.fx
|
||||
/importer:EffectImporter
|
||||
/processor:EffectProcessor
|
||||
/processorParam:DebugMode=Auto
|
||||
/build:blurshader.fx
|
||||
|
||||
|
||||
@@ -109,7 +109,6 @@
|
||||
</ItemContainer>
|
||||
</Item>
|
||||
|
||||
|
||||
<Item
|
||||
name="Underwater Scooter"
|
||||
category="Equipment"
|
||||
@@ -135,8 +134,8 @@
|
||||
<StatusEffect type="OnUse" target="Contained" targetnames="Battery Cell" Condition="-1.0"/>
|
||||
<sound file="scooter.ogg" type="OnUse" range="500.0" loop="true"/>
|
||||
|
||||
<LightComponent LightColor="1.0,1.0,1.0,1.0" Flicker="0.2" range="600">
|
||||
<LightTexture texture="Content/Lights/lightcone.png" origin="0.1, 0.5" size="2.0,1.0"/>
|
||||
<LightComponent LightColor="1.0,1.0,1.0,1.0" Flicker="0.2" range="800">
|
||||
<LightTexture texture="Content/Lights/lightcone.png" origin="0.05, 0.5" size="2.0,1.0"/>
|
||||
</LightComponent>
|
||||
</Propulsion>
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 7.0 KiB |
@@ -191,7 +191,7 @@
|
||||
pickdistance="200"
|
||||
price="10">
|
||||
|
||||
<Sprite texture ="tools.png" sourcerect="0,37,22,9" depth="0.5"/>
|
||||
<Sprite texture ="tools.png" sourcerect="42,0,22,9" depth="0.5"/>
|
||||
|
||||
<Body width="31" height="6" density="40"/>
|
||||
|
||||
@@ -213,4 +213,57 @@
|
||||
</ItemContainer>
|
||||
</Item>
|
||||
|
||||
<Item
|
||||
name="Flashlight"
|
||||
category="Equipment"
|
||||
Tags="smallitem"
|
||||
pickdistance="200"
|
||||
price="10">
|
||||
|
||||
<Deconstruct time="15">
|
||||
<Item name="Copper Bar"/>
|
||||
<Item name="Polycarbonate Bar"/>
|
||||
</Deconstruct>
|
||||
|
||||
<Sprite texture ="tools.png" sourcerect="0,36,27,11" depth="0.5"/>
|
||||
|
||||
<Body width="27" height="10" density="15"/>
|
||||
|
||||
<Holdable slots="Any,RightHand,LeftHand" aimpos="100,0" handle1="0,0">
|
||||
<StatusEffect type="OnActive" target="Contained" Condition="-0.2"/>
|
||||
</Holdable>
|
||||
|
||||
<LightComponent LightColor="1.0,1.0,1.0,1.0" Flicker="0.1" range="800" powerconsumption="10" IsOn="true">
|
||||
|
||||
<LightTexture texture="Content/Lights/lightcone.png" origin="0.0, 0.5" size="2.0,1.0"/>
|
||||
</LightComponent>
|
||||
|
||||
<ItemContainer capacity="1" hideitems="true">
|
||||
<Containable name="Battery Cell">
|
||||
<StatusEffect type="OnContaining" target="This" Voltage="1.0" setvalue="true"/>
|
||||
</Containable>
|
||||
</ItemContainer>
|
||||
</Item>
|
||||
|
||||
<Item
|
||||
name="Flare"
|
||||
category="Equipment"
|
||||
pickdistance="150"
|
||||
price="5"
|
||||
tags="smallitem">
|
||||
|
||||
<Sprite texture ="tools.png" sourcerect="0,37,22,9" depth="0.5"/>
|
||||
|
||||
<Body width="11" height="24" density="30"/>
|
||||
|
||||
<Throwable slots="Any,RightHand,LeftHand" holdpos="0,0" handle1="0,0" throwforce="4.0" aimpos="35,-10">
|
||||
|
||||
</Throwable>
|
||||
|
||||
<LightComponent LightColor="1.0,0.0,0.0,1.0" Flicker="0.5" range="600" IsOn="false">
|
||||
<StatusEffect type="OnActive" target="This" Condition="-0.5"/>
|
||||
<StatusEffect type="OnUse" target="This" IsOn="true"/>
|
||||
</LightComponent>
|
||||
</Item>
|
||||
|
||||
</Items>
|
||||
@@ -0,0 +1,33 @@
|
||||
// Pixel shader applies a one dimensional gaussian blur filter.
|
||||
// This is used twice by the bloom postprocess, first to
|
||||
// blur horizontally, and then again to blur vertically.
|
||||
|
||||
sampler TextureSampler : register(s0);
|
||||
|
||||
#define SAMPLE_COUNT 15
|
||||
|
||||
float2 SampleOffsets[SAMPLE_COUNT];
|
||||
float SampleWeights[SAMPLE_COUNT];
|
||||
|
||||
|
||||
float4 PixelShaderF(float4 position : SV_Position, float4 color : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float4 c = 0;
|
||||
|
||||
// Combine a number of weighted image filter taps.
|
||||
for (int i = 0; i < SAMPLE_COUNT; i++)
|
||||
{
|
||||
c += tex2D(TextureSampler, texCoord + SampleOffsets[i]) * SampleWeights[i];
|
||||
}
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
|
||||
technique GaussianBlur
|
||||
{
|
||||
pass Pass1
|
||||
{
|
||||
PixelShader = compile ps_4_0_level_9_1 PixelShaderF();
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Reference in New Issue
Block a user