Posted By: Puppeteer
Shademode=flat does not work on Intel graphicchips - 01/09/14 17:44
I realized that flat shading does not seem to work on Intel graphicchips like the Intel HD 4000.
How it looks on regular GPUs:
Click me
How it looks on Intel Chips:
Click me
Is it supported? Am I doing something wrong?
Here a little bit of code to try out for yourself:
How it looks on regular GPUs:
Click me
How it looks on Intel Chips:
Click me
Is it supported? Am I doing something wrong?
Here a little bit of code to try out for yourself:
Code:
#include <acknex.h> MATERIAL* mat1={ effect=" const float4x4 matWorldViewProj; // World*view*projection matrix. texture entSkin1; sampler ColorMapSampler = sampler_state { Texture = <entSkin1>; }; struct VS_OUTPUT { float4 position : POSITION0; float4 color : COLOR0; }; VS_OUTPUT DiffuseVS( in float4 InPos: POSITION, in float2 InTex: TEXCOORD0) { VS_OUTPUT output; output.position=InPos; output.position = mul(output.position, matWorldViewProj); output.color=tex2Dlod(ColorMapSampler,float4(InTex.xy,0.0f,0.0f)); return output; } float4 DiffusePS(in float4 col : COLOR0) : COLOR0 { return col; } // Technique: technique DiffuseTechnique { pass P0 { shademode=flat; VertexShader = compile vs_3_0 DiffuseVS(); PixelShader = compile ps_3_0 DiffusePS(); } } "; } void main() { level_load(NULL); camera.x=150; camera.pan=180; //Choose a model you like here =) you=ent_create("player.mdl",NULLVECTOR,NULL); you.material=mat1; }