zoukankan      html  css  js  c++  java
  • [原]unity3d GLSL无法pc上显示

    pc编写GLSL:

    Shader "Custom/GLSL" {
        Properties {
            _MainTex ("Base (RGB)", 2D) = "white" {}
        }
        SubShader {
            Tags { "RenderType"="Opaque" }
            LOD 200
            pass{
                GLSLPROGRAM
                
                    #ifdef VERTEX
                    void main()
                    {
                        gl_Position = gl_ModelViewProjectionMatrix*gl_Vertex;
                    }
                    #endif
                    
                    #ifdef FRAGMENT
                    void main()
                    {
                        gl_FragColor = vec4(1,0,0,0);
                    }
                    #endif
                    
                ENDGLSL
            }
        }
    }

    出现:shader has error or is not supported by your graphics card

    需要通过这样的设置:(设置完后需要重启unity

    重启后的效果:

  • 相关阅读:
    LeetCode
    LeetCode
    LeetCode
    LeetCode
    netty中Pipeline的ChannelHandler执行顺序案例详解
    Pi-设置无线
    Pi1-Centos
    gitlab升级
    ansible
    我也玩Jenkins
  • 原文地址:https://www.cnblogs.com/U-tansuo/p/unity_GLSL.html
Copyright © 2011-2022 走看看