2 registered members (AndrewAMD, ChrstphFr),
941
guests, and 4
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Shademode=flat does not work on Intel graphicchips
#435621
01/09/14 17:44
01/09/14 17:44
|
Joined: Jan 2007
Posts: 2,247 Deutsch Niedersachsen
Puppeteer
OP
Expert
|
OP
Expert
Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
|
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 meHow it looks on Intel Chips: Click meIs it supported? Am I doing something wrong? Here a little bit of code to try out for yourself:
#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;
}
|
|
|
Re: Shademode=flat does not work on Intel graphicchips
[Re: Puppeteer]
#435629
01/09/14 21:28
01/09/14 21:28
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
I don't think you're doing anything wrong.
afaik there are a couple of things which (some ?) intel graphics cards do not support.
POTATO-MAN saves the day! - Random
|
|
|
Re: Shademode=flat does not work on Intel graphicchips
[Re: sivan]
#435644
01/10/14 08:42
01/10/14 08:42
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
My brother's got an Intel in his laptop aswell. I'll let him try it and post the result.
POTATO-MAN saves the day! - Random
|
|
|
|