Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[example] Writing into the depth buffer #2836

Merged
merged 2 commits into from
Jan 1, 2023
Merged

[example] Writing into the depth buffer #2836

merged 2 commits into from
Jan 1, 2023

Conversation

BugraAS
Copy link
Contributor

@BugraAS BugraAS commented Dec 19, 2022

An example to demonstrate how to write into the depth buffer so people don't have to search like I have in the future.

This example replaces the depth values by 1 - depth to essentially invert the depth and make the farthest pixel appear on top.
box

Also I only tested the build on PLATFORM_WEB and PLATFORM_DESKTOP on a Linux machine. I don't know if it works on windows but I don't see why it shouldn't.

Copy link
Contributor Author

@BugraAS BugraAS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found a typo in the makefile

examples/Makefile Outdated Show resolved Hide resolved
@raysan5 raysan5 merged commit 3cfb9a6 into raysan5:master Jan 1, 2023
@raysan5
Copy link
Owner

raysan5 commented Jan 1, 2023

@BugraAlptekinSari Thanks for the example!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants