rt(d3d9): set colorwritemask to all

This commit is contained in:
chyyran 2024-08-12 01:36:57 -04:00 committed by Ronny Chan
parent ac66b1b6f6
commit 1c6581d737

View file

@ -6,13 +6,7 @@ use librashader_runtime::quad::{QuadType, VertexInput};
use windows::Win32::Foundation::FALSE;
use windows::Win32::Graphics::Direct3D9::{
IDirect3DDevice9, IDirect3DVertexBuffer9, IDirect3DVertexDeclaration9, D3DCMP_ALWAYS,
D3DCULL_NONE, D3DDECLMETHOD_DEFAULT, D3DDECLTYPE_FLOAT2, D3DDECLTYPE_FLOAT3,
D3DDECLTYPE_UNUSED, D3DDECLUSAGE_TEXCOORD, D3DPOOL_DEFAULT, D3DPT_TRIANGLESTRIP,
D3DRS_CLIPPING, D3DRS_CULLMODE, D3DRS_LIGHTING, D3DRS_ZENABLE, D3DRS_ZFUNC,
D3DTRANSFORMSTATETYPE, D3DTS_PROJECTION, D3DTS_VIEW, D3DVERTEXELEMENT9,
};
use windows::Win32::Graphics::Direct3D9::{IDirect3DDevice9, IDirect3DVertexBuffer9, IDirect3DVertexDeclaration9, D3DCMP_ALWAYS, D3DCULL_NONE, D3DDECLMETHOD_DEFAULT, D3DDECLTYPE_FLOAT2, D3DDECLTYPE_FLOAT3, D3DDECLTYPE_UNUSED, D3DDECLUSAGE_TEXCOORD, D3DPOOL_DEFAULT, D3DPT_TRIANGLESTRIP, D3DRS_CLIPPING, D3DRS_CULLMODE, D3DRS_LIGHTING, D3DRS_ZENABLE, D3DRS_ZFUNC, D3DTRANSFORMSTATETYPE, D3DTS_PROJECTION, D3DTS_VIEW, D3DVERTEXELEMENT9, D3DRS_COLORWRITEENABLE};
const OFFSCREEN_VBO_DATA: [VertexInput; 4] = [
VertexInput {
@ -111,6 +105,7 @@ impl DrawQuad {
device.SetRenderState(D3DRS_ZENABLE, FALSE.0 as u32)?;
device.SetRenderState(D3DRS_LIGHTING, FALSE.0 as u32)?;
device.SetRenderState(D3DRS_COLORWRITEENABLE, 0xfu32)?;
device.BeginScene()?;
device.SetStreamSource(0, &self.vbo, 0, std::mem::size_of::<VertexInput>() as u32)?;
// device.SetFVF(D3DFVF_XYZRHW | D3DFVF_TEX1)?;