|
@@ -187,13 +187,14 @@ class CommonFilters:
|
|
|
if (configuration.has_key("VolumetricLighting")):
|
|
if (configuration.has_key("VolumetricLighting")):
|
|
|
text += "float decay = 1.0f;\n"
|
|
text += "float decay = 1.0f;\n"
|
|
|
text += "float2 curcoord = l_texcoordC.xy;\n"
|
|
text += "float2 curcoord = l_texcoordC.xy;\n"
|
|
|
- text += "float2 lightdir = curcoord - k_casterpos.xy;\n"
text += "lightdir *= k_vlparams.y;\n"
|
|
|
|
|
- text += "half4 sample = tex2D(k_txcolor, curcoord);\n"
|
|
|
|
|
- text += "float3 vlcolor = sample.rgb * sample.a;\n"
|
|
|
|
|
- text += "for (int i = 0; i < k_vlparams.x; i++) {\n"
|
|
|
|
|
- text += " curcoord -= lightdir;\n"
|
|
|
|
|
- text += " sample = tex2D(k_txcolor, curcoord);\n"
|
|
|
|
|
- text += " sample *= sample.a * decay;//*weight\n"
|
|
|
|
|
|
|
+ text += "float2 lightdir = curcoord - k_casterpos.xy;\n"
|
|
|
|
|
+ text += "lightdir *= k_vlparams.y;\n"
|
|
|
|
|
+ text += "half4 sample = tex2D(k_txcolor, curcoord);\n"
|
|
|
|
|
+ text += "float3 vlcolor = sample.rgb * sample.a;\n"
|
|
|
|
|
+ text += "for (int i = 0; i < k_vlparams.x; i++) {\n"
|
|
|
|
|
+ text += " curcoord -= lightdir;\n"
|
|
|
|
|
+ text += " sample = tex2D(k_txcolor, curcoord);\n"
|
|
|
|
|
+ text += " sample *= sample.a * decay;//*weight\n"
|
|
|
text += " vlcolor += sample.rgb;\n"
|
|
text += " vlcolor += sample.rgb;\n"
|
|
|
text += " decay *= k_vlparams.z;\n"
|
|
text += " decay *= k_vlparams.z;\n"
|
|
|
text += "}\n"
|
|
text += "}\n"
|