paroj / gltut

Learning Modern 3D Graphics Programming
https://paroj.github.io/gltut/
MIT License
1.57k stars 377 forks source link

Error running Tut07 WorldScene #142

Open JarodStreck opened 2 years ago

JarodStreck commented 2 years ago

I successfully build but can't run the Tut07 Worldscene program. I have the following error :

The ♦ shader uses varying theColor, but previous shader does not write to it. Out of resource error.

There is no "theColor" variable in any shader. I didn't edit a single line in those files and also tried with a fresh clone and still didn't work. All first 6 tut worked fine.

Also i'm running it in Clion 2021

JarodStreck commented 2 years ago

Additionnal info :

OS : Win 10 GPU : Intel graphics UHD CPU : I7-10Gen

PepeVoid commented 5 months ago

The issue is that the vertex shader PosColorWorldTransform.vert passes to the fragment shaders ColorPassthrough.frag and ColorMultUniform.frag a smooth variable called "interpColor", but this should be named "theColor" because both frag shaders expect this variable name (smooth variables passed from vertex shaders to fragment shaders should have identical names in both vertex and fragment shader for this connection to happen). Change in PosColorWorldTransform.vert lines "smooth out vec4 interpColor;" and "interpColor = color;" to the correct variable name: "smooth out vec4 theColor;" and "theColor = color;".