Skip to content

Two side turn on-Cull on to Unity shader.

October 18, 2010

아무리 찾아 봐도 메트리얼에 Cull 옵션이 없어서 고민 하다가… 간단히 해결.

쉐어 코드 단에 cull off 라고 한 줄 입력 해 주시면 된다.ㅋ;

Shader “New Shader” {
 Properties {
  _MainTex (“Base (RGB)”, 2D) = “white” {}
 }
 SubShader {
  Tags { “RenderType”=”Opaque” }
  LOD 200
  cull off //컬링 제거
  CGPROGRAM
  #pragma surface surf Lambert

  void surf (Input IN, inout SurfaceOutput o) {
   half4 c = tex2D (_MainTex, IN.uv_MainTex);
   o.Albedo = c.rgb;
   o.Alpha = c.a;
  }
  ENDCG
 }
 FallBack “Diffuse”
}

  sampler2D _MainTex;

  struct Input {
   float2 uv_MainTex;
  };

단 아직 문제는 평면 메시에 셋 노멀에 대한 정화한 명시가 없어서 그런지 광원과 문제를 좀 일으킨다.

이 부분은 유니티 쉐이더 문법 보다 범용 표준 쉐이더 문법으로 다시 짜는게 좋겠다.

Advertisements

From → Unity3D Study

28 Comments
  1. Hello everyone thanks for

    good information.

  2. Very amusing message

  3. thanks for great informations It’s a wonderful

  4. Very valuable piece

  5. I suggest you to come on a site where there are many articles on a theme interesting you.

  6. The excellent and duly answer.

  7. Today I was specially registered at a forum to participate in discussion of this question.

  8. I do not believe.

  9. It is a pity, that now I can not express – it is very occupied. But I will be released – I will necessarily write that I think on this question.

  10. I can recommend.

  11. I consider, that you commit an error. I can prove it. Write to me in PM, we will communicate.

  12. It is remarkable, it is an amusing phrase

  13. I join. All above told the truth. Let’s discuss this question.

  14. Certainly, never it is impossible to be assured.

  15. Tomorrow is a new day.

  16. It is remarkable, this rather valuable opinion

  17. There are still more many variants

  18. This message, is matchless

  19. I apologise, but, in my opinion, you are not right. I suggest it to discuss.

  20. Interestingly, and the analogue is?

  21. It is possible to fill a blank?

  22. I suggest you to come on a site, with an information large quantity on a theme interesting you. For myself I have found a lot of the interesting.

  23. I recommend to you to visit on a site, with a large quantity of articles on a theme interesting you. I can look for the reference.

  24. In my opinion you are not right. I can prove it.

  25. Rather excellent idea

  26. Your idea simply excellent

  27. It is simply excellent idea

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: