Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

GLSL No subshaders can run on this graphics card :( (GTX 980)

Discussion in 'Shaders' started by IgorAherne, Jun 18, 2015.

  1. IgorAherne

    IgorAherne

    Joined:
    May 15, 2013
    Posts:
    385
    [EDIT]
    I suspect that I am silly and GLSL doesn't apply to windows computers xD Am I right?
    In that case, is there a way to force it to work?



    Hey guys!

    Reading this section on basic shaders using GLSL https://en.wikibooks.org/wiki/GLSL_Programming/Unity/Minimal_Shader

    but when I jump into Unity, I get the error: "Shader warning in 'GLSL custom shader': No subshaders can run on this graphics card.
    None of the shaders discussed in the further sections of wiki work ether (when copy-pasted)

    Even if I reduce all the code to just:

    Shader "GLSL custom shader" {
    SubShader {
    Pass {
    GLSLPROGRAM

    ENDGLSL
    }​
    }​
    }​

    I get the same error. My card is Gigabyte GTX 980


    However any CGPROGRAM shaders can compile and execute correctly.
    I stumbled accross this guy: http://forum.unity3d.com/threads/si...shaders-can-run-on-this-graphics-card.114771/

    but his code runs fine on my machine, even though he had the same error message on his pc.



    Please help and thank you!
     
    Last edited: Jun 18, 2015
  2. IgorAherne

    IgorAherne

    Joined:
    May 15, 2013
    Posts:
    385
    Indeed, you have to run unity in a forced openGL mode:

    1) Create a shortcut of unity.exe file
    2)Right click on unity shortcut --> properties and change in Target from "C:\Program Files\Unity\Editor\Unity.exe"

    to

    "C:\Program Files\Unity\Editor\Unity.exe" -force-opengl

    3) double click on that new shortcut to start unity in a forced opengl mode


    if it helped anyone, you can check out my youtube channel https://www.youtube.com/user/Kapurod
     
  3. nick.unity

    nick.unity

    Joined:
    Jul 8, 2015
    Posts:
    1
    I ran Unity with the -force-opengl flag and my project worked in the preview. But when I did the Build and Run, it still failed. So I went to the command line and ran the player manually with " myproject.exe -force-opengl" and the got the project to work. Wish there was a way to automate that, but couldn't find any docs.
     
    IgorAherne likes this.