Quote:
Shader 3.0\2.0 Funktioniert auch trotz schalten von sunlight auf 0 nicht.

Versteh ich nicht. Bei mir funktioniert der einwandfrei. Dann teste mal, ob der selbe Shader - nur mit Vertex lighting - funktioniert (der braucht auch "nur" shader model 2.0):
Code:
#define sat saturate
#define dst distance
#define nrm normalize
#define vlc vecLightColor
#define vlp vecLightPos

float4x4 matWorldViewProj;
float4x4 matWorld;

float4 vecLightColor[8];
float4 vecLightPos[8];
int iLights;

texture entSkin1;
texture entSkin2;

sampler SKIN 	= sampler_state { texture = <entSkin1>;};
sampler LIGHT 	= sampler_state { texture = <entSkin2>;};

float4 VS (	in float4 P : position,
		in float2 T1 : texcoord0,
		in float2 T2 : texcoord1,
		in float3 N : normal,
		out float4 tex : texcoord0,
		out float4 L : texcoord1) : position {

	L = 0;
	tex.xy = T1;
	tex.zw = T2;
	float4 pos = mul(P,matWorld);
	float3 normal = mul(N,matWorld);

	for (int i=0; max(0,i<iLights-1); i++) 
		L += vlc[i] * sat((vlp[i].w - dst(vlp[i].xyz,pos)) / vlp[i].w)
		* sat(dot(nrm(vlp[i].xyz - pos.xyz),normal));
	
	return mul(P,matWorldViewProj);}

float4 PS (	in float4 tex : texcoord0,
		in float4 L : texcoord1) : color {

	float4 color = tex2D(SKIN,tex.xy);	
	color = lerp (color,color * (tex2D(LIGHT,tex.zw) + L),color.a);
	return color;}

technique t{ pass p{
	
	zWriteEnable = 1;
	AlphaBlendEnable = 0;
	VertexShader = compile vs_2_0 VS();
	PixelShader = compile ps_2_0 PS();	}}


also zumindest hier läuft der Shader so wie er soll (sun_light wird diesmal nicht beachtet, dadurch gehen auch nur 7 Lichter) Wobei ich zugeben muss, dass diese Version nicht gerade das Gelbe vom Ei is!