Message #1645157 - D3D error in shader compilation: info: %s / code: %s

Kind #687: D3D error in shader compilation: info: %s / code: %s

Game: Resistance: Retribution™ (UCES01184_1.00)

D3D error in shader compilation: info: (101): error X4004: program too complex; there are more active values than registers
 / code: #pragma warning( disable : 3571 )
float4x4 u_proj : register(c0);
float2 u_fogcoef : register(c18);
float4 u_matambientalpha : register(c20);
float4x3 u_world : register(c11);
float4x3 u_view : register(c8);
float4 u_uvscaleoffset : register(c17);
float3 u_lightpos0 : register(c24);
float3 u_lightatt0 : register(c32);
float3 u_lightambient0 : register(c48);
float3 u_lightdiffuse0 : register(c40);
float3 u_lightspecular0 : register(c44);
float3 u_lightpos1 : register(c25);
float3 u_lightatt1 : register(c33);
float3 u_lightambient1 : register(c49);
float3 u_lightdiffuse1 : register(c41);
float3 u_lightspecular1 : register(c45);
float3 u_lightpos2 : register(c26);
float3 u_lightatt2 : register(c34);
float3 u_lightambient2 : register(c50);
float3 u_lightdiffuse2 : register(c42);
float3 u_lightspecular2 : register(c46);
float3 u_lightpos3 : register(c27);
float3 u_lightatt3 : register(c35);
float3 u_lightambient3 : register(c51);
float3 u_lightdiffuse3 : register(c43);
float3 u_lightspecular3 : register(c47);
float4 u_ambient : register(c19);
float3 u_matdiffuse : register(c21);
float4 u_matspecular : register(c22);
float3 u_matemissive : register(c23);
float4 u_cullRangeMin : register(c80);
float4 u_cullRangeMax : register(c81);
struct VS_IN {                              
  float2 texcoord : TEXCOORD0;
  float4 color0 : COLOR0;
  float3 normal : NORMAL;
  float3 position : POSITION;
};
struct VS_OUT {
  float3 v_texcoord : TEXCOORD0;
  float4 v_color0    : COLOR0;
  float3 v_color1    : COLOR1;
  float v_fogdepth: TEXCOORD1;
  float4 gl_Position   : POSITION;
};
VS_OUT main(VS_IN In) {
  VS_OUT Out;
  float3 worldpos = mul(float4(In.position.xyz, 1.0), u_world);
  float3 worldnormal = normalize(mul(float4(In.normal, 0.0), u_world));
  float4 viewPos = float4(mul(float4(worldpos, 1.0), u_view), 1.0);
  float4 outPos = mul(viewPos, u_proj);
  float4 lightSum0 = u_ambient * In.color0 + float4(u_matemissive, 0.0);
  float3 lightSum1 = 0;
  float3 toLight;
  float3 diffuse;
  float distance;
  float lightScale;
  float ldot;
  toLight = u_lightpos0 - worldpos;
  distance = length(toLight);
  toLight /= distance;
  ldot = dot(toLight, worldnormal);
  lightScale = clamp(1.0 / dot(u_lightatt0, float3(1.0, distance, distance*distance)), 0.0, 1.0);
  diffuse = (u_lightdiffuse0 * u_matdiffuse) * max(ldot, 0.0);
  if (ldot >= 0.0) {
    ldot = dot(normalize(toLight + float3(0.0, 0.0, 1.0)), worldnormal);
    if (u_matspecular.a == 0.0) {
      ldot = 1.0;
    } else {
      ldot = pow(max(ldot, 0.0), u_matspecular.a);
    }
    if (ldot > 0.0)
      lightSum1 += u_lightspecular0 * u_matspecular.rgb * ldot  * lightScale;
  }
  lightSum0.rgb += (u_lightambient0 * In.color0.rgb + diffuse) * lightScale;
  toLight = u_lightpos1 - worldpos;
  distance = length(toLight);
  toLight /= distance;
  ldot = dot(toLight, worldnormal);
  lightScale = clamp(1.0 / dot(u_lightatt1, float3(1.0, distance, distance*distance)), 0.0, 1.0);
  diffuse = (u_lightdiffuse1 * u_matdiffuse) * max(ldot, 0.0);
  if (ldot >= 0.0) {
    ldot = dot(normalize(toLight + float3(0.0, 0.0, 1.0)), worldnormal);
    if (u_matspecular.a == 0.0) {
      ldot = 1.0;
    } else {
      ldot = pow(max(ldot, 0.0), u_matspecular.a);
    }
    if (ldot > 0.0)
      lightSum1 += u_lightspecular1 * u_matspecular.rgb * ldot  * lightScale;
  }
  lightSum0.rgb += (u_lightambient1 * In.color0.rgb + diffuse) * lightScale;
  toLight = u_lightpos2 - worldpos;
  distance = length(toLight);
  toLight /= distance;
  ldot = dot(toLight, worldnormal);
  lightScale = clamp(1.0 / dot(u_lightatt2, float3(1.0, distance, distance*distance)), 0.0, 1.0);
  diffuse = (u_lightdiffuse2 * u_matdiffuse) * max(ldot, 0.0);
  if (ldot >= 0.0) {
    ldot = dot(normalize(toLight + float3(0.0, 0.0, 1.0)), worldnormal);
    if (u_matspecular.a == 0.0) {
      ldot = 1.0;
    } else {
      ldot = pow(max(ldot, 0.0), u_matspecular.a);
    }
    if (ldot > 0.0)
      lightSum1 += u_light

Status: new. 63 hits from 2020-09-02 22:37:03 to 2020-09-02 22:37:55 UTC. Message #1645157.

Individual reports are stored since 2026-11-12, the newest 100 per message; none for this message yet. Older hits only exist as the counters above. Hover a cell for details.