From 2723bfbc91419883abb1c5bfe02441252ba5f308 Mon Sep 17 00:00:00 2001 From: Azaezel Date: Thu, 23 Jun 2016 11:44:17 -0500 Subject: [PATCH] corrects corruption in precipitation class --- Engine/source/T3D/fx/precipitation.cpp | 2 +- Templates/Empty/game/shaders/common/precipP.hlsl | 2 +- Templates/Empty/game/shaders/common/precipV.hlsl | 5 +++-- Templates/Full/game/shaders/common/precipP.hlsl | 2 +- Templates/Full/game/shaders/common/precipV.hlsl | 5 +++-- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Engine/source/T3D/fx/precipitation.cpp b/Engine/source/T3D/fx/precipitation.cpp index 0cbcf7c7f..b0d8440d5 100644 --- a/Engine/source/T3D/fx/precipitation.cpp +++ b/Engine/source/T3D/fx/precipitation.cpp @@ -963,7 +963,7 @@ void Precipitation::initRenderObjects() // Create a volitile vertex buffer which // we'll lock and fill every frame. - mRainVB.set(GFX, mMaxVBDrops * 4, GFXBufferTypeVolatile); + mRainVB.set(GFX, mMaxVBDrops * 4, GFXBufferTypeDynamic); // Init the index buffer for rendering the // entire or a partially filled vb. diff --git a/Templates/Empty/game/shaders/common/precipP.hlsl b/Templates/Empty/game/shaders/common/precipP.hlsl index 0f5325154..069ba4992 100644 --- a/Templates/Empty/game/shaders/common/precipP.hlsl +++ b/Templates/Empty/game/shaders/common/precipP.hlsl @@ -29,7 +29,7 @@ struct Conn { float4 position : TORQUE_POSITION; - float4 texCoord : TEXCOORD0; + float2 texCoord : TEXCOORD0; float4 color : COLOR0; }; diff --git a/Templates/Empty/game/shaders/common/precipV.hlsl b/Templates/Empty/game/shaders/common/precipV.hlsl index c1e6d7c00..3c40942c7 100644 --- a/Templates/Empty/game/shaders/common/precipV.hlsl +++ b/Templates/Empty/game/shaders/common/precipV.hlsl @@ -32,13 +32,14 @@ struct Vert { float3 position : POSITION; - float4 texCoord : TEXCOORD0; + float2 texCoord : TEXCOORD0; + float4 color : COLOR0; }; struct Conn { float4 position : TORQUE_POSITION; - float4 texCoord : TEXCOORD0; + float2 texCoord : TEXCOORD0; float4 color : COLOR0; }; diff --git a/Templates/Full/game/shaders/common/precipP.hlsl b/Templates/Full/game/shaders/common/precipP.hlsl index 0f5325154..069ba4992 100644 --- a/Templates/Full/game/shaders/common/precipP.hlsl +++ b/Templates/Full/game/shaders/common/precipP.hlsl @@ -29,7 +29,7 @@ struct Conn { float4 position : TORQUE_POSITION; - float4 texCoord : TEXCOORD0; + float2 texCoord : TEXCOORD0; float4 color : COLOR0; }; diff --git a/Templates/Full/game/shaders/common/precipV.hlsl b/Templates/Full/game/shaders/common/precipV.hlsl index c1e6d7c00..3c40942c7 100644 --- a/Templates/Full/game/shaders/common/precipV.hlsl +++ b/Templates/Full/game/shaders/common/precipV.hlsl @@ -32,13 +32,14 @@ struct Vert { float3 position : POSITION; - float4 texCoord : TEXCOORD0; + float2 texCoord : TEXCOORD0; + float4 color : COLOR0; }; struct Conn { float4 position : TORQUE_POSITION; - float4 texCoord : TEXCOORD0; + float2 texCoord : TEXCOORD0; float4 color : COLOR0; };