rt(d3d9): disable alpha blending
This commit is contained in:
parent
e7fe96520e
commit
dbfa822f7c
|
@ -4,14 +4,15 @@ use array_concat::concat_arrays;
|
||||||
use bytemuck::offset_of;
|
use bytemuck::offset_of;
|
||||||
use librashader_runtime::quad::{QuadType, VertexInput};
|
use librashader_runtime::quad::{QuadType, VertexInput};
|
||||||
|
|
||||||
use windows::Win32::Foundation::FALSE;
|
use windows::Win32::Foundation::{FALSE, TRUE};
|
||||||
|
|
||||||
use windows::Win32::Graphics::Direct3D9::{
|
use windows::Win32::Graphics::Direct3D9::{
|
||||||
IDirect3DDevice9, IDirect3DVertexBuffer9, IDirect3DVertexDeclaration9, D3DCMP_ALWAYS,
|
IDirect3DDevice9, IDirect3DVertexBuffer9, IDirect3DVertexDeclaration9, D3DCMP_ALWAYS,
|
||||||
D3DCULL_NONE, D3DDECLMETHOD_DEFAULT, D3DDECLTYPE_FLOAT2, D3DDECLTYPE_FLOAT3,
|
D3DCULL_NONE, D3DDECLMETHOD_DEFAULT, D3DDECLTYPE_FLOAT2, D3DDECLTYPE_FLOAT3,
|
||||||
D3DDECLTYPE_UNUSED, D3DDECLUSAGE_TEXCOORD, D3DPOOL_DEFAULT, D3DPT_TRIANGLESTRIP,
|
D3DDECLTYPE_UNUSED, D3DDECLUSAGE_TEXCOORD, D3DPOOL_DEFAULT, D3DPT_TRIANGLESTRIP,
|
||||||
D3DRS_CLIPPING, D3DRS_COLORWRITEENABLE, D3DRS_CULLMODE, D3DRS_LIGHTING, D3DRS_ZENABLE,
|
D3DRS_ALPHABLENDENABLE, D3DRS_CLIPPING, D3DRS_COLORWRITEENABLE, D3DRS_CULLMODE, D3DRS_LIGHTING,
|
||||||
D3DRS_ZFUNC, D3DTRANSFORMSTATETYPE, D3DTS_PROJECTION, D3DTS_VIEW, D3DVERTEXELEMENT9,
|
D3DRS_ZENABLE, D3DRS_ZFUNC, D3DTRANSFORMSTATETYPE, D3DTS_PROJECTION, D3DTS_VIEW,
|
||||||
|
D3DVERTEXELEMENT9,
|
||||||
};
|
};
|
||||||
|
|
||||||
const OFFSCREEN_VBO_DATA: [VertexInput; 4] = [
|
const OFFSCREEN_VBO_DATA: [VertexInput; 4] = [
|
||||||
|
@ -112,6 +113,7 @@ impl DrawQuad {
|
||||||
device.SetRenderState(D3DRS_LIGHTING, FALSE.0 as u32)?;
|
device.SetRenderState(D3DRS_LIGHTING, FALSE.0 as u32)?;
|
||||||
|
|
||||||
device.SetRenderState(D3DRS_COLORWRITEENABLE, 0xfu32)?;
|
device.SetRenderState(D3DRS_COLORWRITEENABLE, 0xfu32)?;
|
||||||
|
device.SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE.0 as u32)?;
|
||||||
device.BeginScene()?;
|
device.BeginScene()?;
|
||||||
device.SetStreamSource(0, &self.vbo, 0, std::mem::size_of::<VertexInput>() as u32)?;
|
device.SetStreamSource(0, &self.vbo, 0, std::mem::size_of::<VertexInput>() as u32)?;
|
||||||
// device.SetFVF(D3DFVF_XYZRHW | D3DFVF_TEX1)?;
|
// device.SetFVF(D3DFVF_XYZRHW | D3DFVF_TEX1)?;
|
||||||
|
|
Loading…
Reference in a new issue