From bc28aa1d10919eedf49b35d918d16622d414b4f6 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Thu, 25 Feb 2016 19:38:11 -1000 Subject: [PATCH] Working D3D TIND rendering --- Runtime/CGraphics.hpp | 4 ++-- Runtime/Particle/CElementGen.cpp | 2 +- Runtime/Particle/CElementGenShadersHLSL.cpp | 3 +-- Runtime/Particle/CParticleElectric.cpp | 4 ++++ hecl | 2 +- libSpecter | 2 +- 6 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Runtime/CGraphics.hpp b/Runtime/CGraphics.hpp index d8eba54ec..3d367715f 100644 --- a/Runtime/CGraphics.hpp +++ b/Runtime/CGraphics.hpp @@ -209,10 +209,10 @@ public: { g_BooMainCommandQueue->setShaderDataBinding(binding); } - static void ResolveSpareTexture(const SClipScreenRect& rect, bool color, bool depth) + static void ResolveSpareTexture(const SClipScreenRect& rect) { boo::SWindowRect wrect = {rect.x4_left, rect.x8_top, rect.xc_width, rect.x10_height}; - g_BooMainCommandQueue->resolveBindTexture(g_SpareTexture, wrect, true, color, depth); + g_BooMainCommandQueue->resolveBindTexture(g_SpareTexture, wrect, true, true, false); } static void DrawInstances(size_t start, size_t count, size_t instCount) { diff --git a/Runtime/Particle/CElementGen.cpp b/Runtime/Particle/CElementGen.cpp index 9b3389e7a..fa525c15a 100644 --- a/Runtime/Particle/CElementGen.cpp +++ b/Runtime/Particle/CElementGen.cpp @@ -2000,7 +2000,7 @@ void CElementGen::RenderParticlesIndirectTexture() if (!clipRect.x0_valid) continue; - CGraphics::ResolveSpareTexture(clipRect, true, false); + CGraphics::ResolveSpareTexture(clipRect); g_instIndTexData.emplace_back(); SParticleInstanceIndTex& inst = g_instIndTexData.back(); diff --git a/Runtime/Particle/CElementGenShadersHLSL.cpp b/Runtime/Particle/CElementGenShadersHLSL.cpp index 0ea5b338c..3637041de 100644 --- a/Runtime/Particle/CElementGenShadersHLSL.cpp +++ b/Runtime/Particle/CElementGenShadersHLSL.cpp @@ -97,7 +97,7 @@ static const char* VS_HLSL_INDTEX = "{\n" " VertToFrag vtf;\n" " vtf.color = v.colorIn * moduColor;\n" -" vtf.uvScene = v.uvsInScene;\n" +" vtf.uvScene = v.uvsInScene * float4(1.0, -1.0, 1.0, -1.0);\n" " vtf.uvTexr = v.uvsInTexrTind[vertId].xy;\n" " vtf.uvTind = v.uvsInTexrTind[vertId].zw;\n" " vtf.position = mul(mvp, v.posIn[vertId]);\n" @@ -123,7 +123,6 @@ static const char* FS_HLSL_INDTEX = " float2 tindTexel = tex2.Sample(samp, vtf.uvTind).zw;\n" " float4 sceneTexel = tex1.Sample(samp, lerp(vtf.uvScene.xy, vtf.uvScene.zw, tindTexel));\n" " float4 texrTexel = tex0.Sample(samp, vtf.uvTexr);\n" -" return float4(tindTexel, 0.0, 1.0);\n" " float4 colorOut = vtf.color * sceneTexel + texrTexel;\n" " colorOut.a = vtf.color.a * texrTexel.a;\n" " return colorOut;\n" diff --git a/Runtime/Particle/CParticleElectric.cpp b/Runtime/Particle/CParticleElectric.cpp index bf834bac5..3f5a2fa02 100644 --- a/Runtime/Particle/CParticleElectric.cpp +++ b/Runtime/Particle/CParticleElectric.cpp @@ -1,4 +1,8 @@ #include "CParticleElectric.hpp" +#include "CGenDescription.hpp" +#include "CSwooshDescription.hpp" +#include "CElectricDescription.hpp" +#include "CModel.hpp" #include "CGraphics.hpp" namespace pshag diff --git a/hecl b/hecl index 2f38f89c0..6edc8fcbb 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit 2f38f89c0f840b4166d62bcd77172365884ed3ab +Subproject commit 6edc8fcbb6a6c36fbeda8a6848d90c7149d6a3ae diff --git a/libSpecter b/libSpecter index aac0b93f6..49fee6bad 160000 --- a/libSpecter +++ b/libSpecter @@ -1 +1 @@ -Subproject commit aac0b93f64ba8e5d6bdf718a5ea5d78226a80a49 +Subproject commit 49fee6badf9e46b2cc44b30ca7437055989fc304