简体   繁体   English

Unity3D屏幕上的黑色物体

[英]Black objects on screen in Unity3D

I am working on a game and this is what happens in the game scene. 我正在开发一个游戏,这就是游戏场景中发生的事情。

I verified the shader on each piece dozens of times, but it is ok. 我对每块着色器进行了数十次验证,但是还可以。 In the picture you can see the debug messages with the color, emission and albedo on the materials, and they are ok. 在图片中,您可以看到调试消息,其中包含材料上的颜色,发射和反照率,并且它们没问题。 Any ideas what the problem could be? 任何想法可能是什么问题? Any suggestion is ok because the release day is coming. 任何建议都可以,因为发布日期快到了。

EDIT: 编辑:

Properties {
_Color ("Main Color", Color) = (1,1,1,1)  
_Cube ("Cubemap", CUBE) = "" {}
  _Emission ("Emission", Range (0.0, 1.0)) = 0.5
  _Albedo("Albedo", Range (0.01, 1)) = 0.9

}
SubShader {
  Tags {"RenderType" = "Opaque" }

  //Blend Off

  Cull Off

  CGPROGRAM
  #pragma surface surf Lambert approxview noforwardadd

  fixed4 _Color;

  struct Input 
  {
      half3 worldRefl;
  };

  samplerCUBE _Cube;

  float _Emission;

  float _Albedo;

  void surf (Input IN, inout SurfaceOutput o) {
      o.Albedo = _Color.rgb * _Albedo;
      o.Emission = texCUBE (_Cube, IN.worldRefl).rgb * _Emission;

  }

  ENDCG
} 
Fallback "Diffuse"
}

Try making "main color" brighter. 尝试使“主色”更亮。 That could potentially solve it. 那有可能解决它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM