Comments (3)
Does the current version of the repository work for you?
To answer your other questions:
-I believe that was true at one point, however, as far as I'm aware it isn't true in older GLSL versions, and it also isn't true in newer GLSL versions. As OpenGL wiki says in https://www.opengl.org/wiki/Core_Language_%28GLSL%29 , "The default if no qualifier is specific is in." That, combined with the fact that it works with every GLSL compiler I've ever seen, seems to indicate that this is perfectly legal code.
-In a way that stays compatible with GLSL 120, no. However, if you don't care about that, GLSL offers a textureSize function ( https://www.opengl.org/sdk/docs/man/html/textureSize.xhtml ). You can use that to find what the texture's size is, and based on that, you can determine if a texture is bound or not.
from 3dgameengine.
Hello, Benny.
Sorry for the late reply. I was following your tutorials further and we get rid of this "weird if statement" later in series when implementing forward rendering system. But it wasn't problem in if statement. Using gDEBugger I have discovered another weird thing that really happens:
- On engine side all uniforms are updated with correct values (doublechecked with debugger, uniform locations are all different). But on shader side pointLight.base.intensity and pointlight.atten.constant uniforms behave like it's one uniform. More precisely pointLight.base.intensity is always equal to pointlight.atten.constant for some mysterious reason. Hence I can't set pointLight.base.intensity to desired value.
This may be connected to another problem I posted: BennyQBD/3DEngineCpp#22
This time pointLight.base.intensity and several more uniforms are optimized away.
And another fact: R_directionalLight.base.intensity works fine.
Did you see such issue earlier? And thanks for answers for other questions!
from 3dgameengine.
One quirk of GLSL is if the GLSL compiler doesn't think a uniform affects the code, then it silently removes it. It's possible that one of those two uniforms, according to the GLSL compiler "doesn't affect the code," and that the removal has given them the same value in the final output. I suspect that this could be a driver bug, and if the code works on other computers, then it probably is.
That's one of the reasons why I want to know if the current repository works for you. If it doesn't, then it almost certainly is a driver issue (or I've somehow royally screwed something up somewhere). If it does work for you, then it's more likely that you've either made a mistake in your GLSL code, or you've written your GLSL code in a way that's confusing the compiler like that.
from 3dgameengine.
Related Issues (18)
- F# discrepancy HOT 3
- Pointlights HOT 14
- Fix Y-axes camera HOT 5
- finalize method HOT 5
- Mesh-Optimisation HOT 3
- Your Input class is unneeded. HOT 3
- Texture flipping HOT 3
- sampling.glh missing HOT 4
- Unneeded re-declaration of lights HOT 2
- No Compatible Shaders for Mac HOT 2
- #8 No Triangle Displayed HOT 1
- Mesh Rendering HOT 5
- seg fault HOT 1
- cannot convert from 'const 4-component vector of highp float' to 'FragUserData 3-component vector of highp float' HOT 1
- After tutorial 47, the camera has inheritance issues
- Camera's orientation gets locked into place HOT 1
- IDEA Dont sees src as a source folder
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 3dgameengine.