Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tutorial 05 shader filename problem #149

Open
Gigabitten opened this issue Sep 28, 2023 · 3 comments
Open

Tutorial 05 shader filename problem #149

Gigabitten opened this issue Sep 28, 2023 · 3 comments

Comments

@Gigabitten
Copy link

Gigabitten commented Sep 28, 2023

All the chapter 5 tutorials use Standard.vert and Standard.frag, which can be located in the data folder in the folder for the chapter. It seems like all the data folders for every chapter get pulled into a top-level data folder, which is what's actually read from when the tutorials get run. My guess is that there's something funky going on with case sensitivity; there's already a standard.vert and a standard.frag in there, and no Standard.vert or Standard.frag. If I run:

find . -type f -exec sed -i 's/Standard\.frag/Standard05\.frag/g' {} +
find . -type f -exec sed -i 's/Standard\.vert/Standard05\.vert/g' {} +
mv Tut\ 05\ Objects\ in\ Depth/data/Standard.frag Tut\ 05\ Objects\ in\ Depth/data/Standard05.frag
mv Tut\ 05\ Objects\ in\ Depth/data/Standard.vert Tut\ 05\ Objects\ in\ Depth/data/Standard05.vert

then build the tutorial, it works fine.

(Note: using sed to do a global find-replace on Standard.frag and Standard.vert is proooobably overkill and could even hit too much if other tutorials have similarly-named shaders, it's probably better to just change the names in those few tutorials)

@paroj
Copy link
Owner

paroj commented Sep 29, 2023

works here:

gltut$ cmake -GNinja -Bbuild .
gltut$ ls build/data/ | grep St
StandardColors.frag
Standard.frag
Standard.vert

@Gigabitten
Copy link
Author

For various dumb reasons, I'm on Windows and using Visual Studio, here. Maybe it's specific to one of those? Maybe I'm the first person to report this because I'm the only person this goofy hehe

@Akamitori
Copy link

Akamitori commented Sep 24, 2024

There's nothing dumb about your statement @Gigabitten .
Windows is case insensitive on file names.
Chapter 3 has standard.vert and standard.frag.
This creates a conflict with the shader files at Chapter 5 which are called Standard.vert and Standard.frag because as far as windows are concerned they are the same files.
One solution would be to rename the files in the code and data folder for chapter 5. Then after doing a clean and rebuild you should be fine.

@paroj
In practice this creates a conflict between the shader file names utilized in Tut03CPUPositionOffset and Tut05OverlapNoDepth.
In Windows, the naming conflict resolves randomly. Hence, one out of those 2 won't copy the shader files properly and hence the screen won't display anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants