Depth Shader If a is the fragment depth in the NDCS, what output colour below from the fragment shader will cause a fragment at the near clipping plane to be white and a fragment at the far clipping plane to be black? vec4( d, d, d, 1) vec4( 1-d, 1-d, 1-d, 1). vec4(0.5(d+1), 0.5(d+1), 0.5(d+1), 1)

Systems Architecture
7th Edition
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Stephen D. Burd
Chapter7: Input/output Technology
Section: Chapter Questions
Problem 19VE
icon
Related questions
Question
Depth Shader
If a is the fragment depth in the NDCS, what output colour below from the fragment shader will cause a fragment at the near clipping plane to be white and a fragment at the far clipping
plane to be black?
vec4( d, d, d, 1)
vec4 1-d, 1-d, 1-d, 1)
vec4( 0.5(d+1), 0.5(d+1), 0.5(d+1), 1)
vec4( 0.5(1-d), 0.5(1-d), 0.5(1-d), 1)
Transcribed Image Text:Depth Shader If a is the fragment depth in the NDCS, what output colour below from the fragment shader will cause a fragment at the near clipping plane to be white and a fragment at the far clipping plane to be black? vec4( d, d, d, 1) vec4 1-d, 1-d, 1-d, 1) vec4( 0.5(d+1), 0.5(d+1), 0.5(d+1), 1) vec4( 0.5(1-d), 0.5(1-d), 0.5(1-d), 1)
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Concept of Light
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning