dilevin / computer-graphics-shader-pipeline

Computer Graphics Assignment about the Shader Pipeline
2 stars 7 forks source link

Procedural_color Compilation and lit.fs #73

Open dorsa01 opened 3 weeks ago

dorsa01 commented 3 weeks ago

Hi

I have two questions. My first question is about test-06 and my second question is about lit.fs.

1-When I try to run test-06, I get the following error: ERROR: failed to compile fragment shader ERROR: ../src/blinn_phong.glsl:13: 'sample' : syntax error syntax error

Even when I run the test-06 with only "color = vec3(1,1,1)" in proceduarl_color.fs, I get the above error. The test-05 runs without any error. What can the problem be?

2- In lit.fs, should we pick the viewing direction for blinn_phong function ourselves or should we find it from the given uniform variables and inputs?

Thank you so much

mengf821 commented 3 weeks ago

Hello,

For question 1 - it's hard to judge exactly what is wrong without looking at your code. I can only make some educated guesses. If your test-05 runs fine but your test-06 gives our an error with only color = vec3(1,1,1) in your fragment shader then what is wrong likely lies in your random_direction.glsl, smooth_step.glsl or perlin_noise.glsl, as those are not used in test-05.

For question 2 - you should find it from the given in and uniform variables.