Working D3D TIND rendering

This commit is contained in:
Jack Andersen 2016-02-25 19:38:11 -10:00
parent 8dd023e0e8
commit bc28aa1d10
6 changed files with 10 additions and 7 deletions

View File

@ -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)
{

View File

@ -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();

View File

@ -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"

View File

@ -1,4 +1,8 @@
#include "CParticleElectric.hpp"
#include "CGenDescription.hpp"
#include "CSwooshDescription.hpp"
#include "CElectricDescription.hpp"
#include "CModel.hpp"
#include "CGraphics.hpp"
namespace pshag

2
hecl

@ -1 +1 @@
Subproject commit 2f38f89c0f840b4166d62bcd77172365884ed3ab
Subproject commit 6edc8fcbb6a6c36fbeda8a6848d90c7149d6a3ae

@ -1 +1 @@
Subproject commit aac0b93f64ba8e5d6bdf718a5ea5d78226a80a49
Subproject commit 49fee6badf9e46b2cc44b30ca7437055989fc304