Advertisement

GLSL mix() function is not working

Started by June 12, 2018 06:16 PM
2 comments, last by HawkDeath 6 years, 7 months ago

Hi,

I'm trying mix two textures using own shader system, but I have a problem (I think) with uniforms.

Code: https://github.com/HawkDeath/shader/tree/test

To debug I use RenderDocs, but I did not receive good results. In the first attachment is my result, in the second attachment is what should be.

PS. I base on this tutorial https://learnopengl.com/Getting-started/Textures.

renderdoc-cap.PNG

renderdoc-cap2.PNG

Junior Software Engineer. Big fan a graphics programming. 

Looks to me like you haven't populated and bound your texture units correctly. Check the return values of glBindTexture, glTexture2D, etc.

RIP GameDev.net: launched 2 unusably-broken forum engines in as many years, and now has ceased operating as a forum at all, happy to remain naught but an advertising platform with an attached social media presense, headed by a staff who by their own admission have no idea what their userbase wants or expects.Here's to the good times; shame they exist in the past.
Advertisement

I use wrong buffer. I used a glGenBuffers rather then glGenTextures.

Junior Software Engineer. Big fan a graphics programming. 

This topic is closed to new replies.

Advertisement