x


Z value shader

I want to create a surface shader that outputs a grayscale value based on the pixel's z value. How can I do that?

more ▼

asked Feb 29 '12 at 04:31 PM

Lior gravatar image

Lior
1 1 1 1

(comments are locked)
10|3000 characters needed characters left

1 answer: sort oldest

Here you go.

To more experiences guys : is it possible to retrieve some depth information in vertex shader with position.w * frustrumLength ?

more ▼

answered Feb 29 '12 at 04:59 PM

Berenger gravatar image

Berenger
11k 12 19 53

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1665
x293
x59
x28

asked: Feb 29 '12 at 04:31 PM

Seen: 608 times

Last Updated: Feb 29 '12 at 04:59 PM