Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > C/C++
You last visited: Today at 16:20

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Direct X 11 Alpha State

Discussion on Direct X 11 Alpha State within the C/C++ forum part of the Coders Den category.

Reply
 
Old   #1
 
Terrat's Avatar
 
elite*gold: 130
Join Date: Apr 2012
Posts: 1,173
Received Thanks: 670
Direct X 11 Alpha State

Bilder sagen glaube ich mehr als Worte:

Er überschreibt den Transparenten bereich, wobei dieser ja genaugenommen einfach garnicht überschrieben werden sollte.
Alpha Blenddesc:
Code:
	p_AlphaBlendDesc.RenderTarget[0].BlendEnable = TRUE;
	p_AlphaBlendDesc.RenderTarget[0].BlendOp = D3D11_BLEND_OP_ADD;
	p_AlphaBlendDesc.RenderTarget[0].SrcBlend = D3D11_BLEND_SRC_ALPHA;
	p_AlphaBlendDesc.RenderTarget[0].DestBlend = D3D11_BLEND_INV_SRC_ALPHA;
	p_AlphaBlendDesc.RenderTarget[0].BlendOpAlpha = D3D11_BLEND_OP_ADD;
	p_AlphaBlendDesc.RenderTarget[0].SrcBlendAlpha = D3D11_BLEND_ZERO;
	p_AlphaBlendDesc.RenderTarget[0].DestBlendAlpha = D3D11_BLEND_ZERO;
	p_AlphaBlendDesc.RenderTarget[0].BlendOpAlpha = D3D11_BLEND_OP_ADD;
	p_AlphaBlendDesc.RenderTarget[0].RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL;
Render:
Code:
	p_3DContext->OMSetBlendState(p_AlphaBlendState, NULL,0xFFFFFF);//Set Alpha Blenddesc
	p_3DContext->IASetInputLayout(p_InputLayout);
	p_3DContext->IASetVertexBuffers(0, 1, &p_Clients[param_Spritestorage]->p_VertexBuffer_, &p_Stride, &p_Offset);
	p_3DContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
	p_3DContext->VSSetShader(p_Solid2DVS, 0, 0);
	p_3DContext->PSSetShader(p_Solid2DPS, 0, 0);
	p_3DContext->PSSetShaderResources(0, 1, &p_Clients[param_Spritestorage]->p_ColorMap_);
	p_3DContext->PSSetSamplers(0, 1, &p_Clients[param_Spritestorage]->p_ColorMapSampler_);
	XMMATRIX world = p_Clients[param_Spritestorage]->GetWorldMatrix();
	XMMATRIX mvp = XMMatrixMultiply(world, p_2DMatrix);
	mvp = XMMatrixTranspose(mvp);
	p_3DContext->UpdateSubresource(p_Clients[param_Spritestorage]->p_MvpCB_, 0, 0, &mvp, 0, 0);
	p_3DContext->VSSetConstantBuffers(0, 1, &p_Clients[param_Spritestorage]->p_MvpCB_);
	p_3DContext->Draw(6, 0);
	p_3DContext->OMSetBlendState(p_BlendState, NULL, 0xFFFFFFFF);//Restore non alpha Blenddesc
Terrat is offline  
Reply


Similar Threads Similar Threads
What is the best set state ?
05/06/2013 - S4 League - 1 Replies
Hi guys i want to ask you about best set i can do with hack i can change the state with CE so what is the best state i should use on my items ? Ty :)



All times are GMT +1. The time now is 16:22.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.