-
Notifications
You must be signed in to change notification settings - Fork 1
Finally use textures again for planets demo #20
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fixes one bug and gives it more parameters Now it assumes positions are in View space
Top of mountains = 1; bottom of ocean = 0
A Block instance isn't going to be possible to provide at all for things like Textures. Let people receive the error when they try to use it
The image format declared for the Texture2D binding must match the one given on the shader (e.g. RGBA8 UNorm)
Likely caused by Unsafe.toLinear uses allowing a variable to be captured in a closure and then incorrectly freed before the 'immediateSubmit' is run. If we move 'destroyBuffer' to after 'immediateSubmit' then it is fixed, but this should never happen with linear types... This is in 'textureFromImage'. The 'stagingBuffer' was captured in one of the commands, then destroyed. It would never have happened if we didn't use Unsafe.toLinear so liberally! At least it's only in ghengin-vulkan...
…lkan bit Makes the Command abstraction safer, despite the still occurrence of some Unsafe.toLinears in it.
Closed
Contributor
|
Excellent work! I will check it out later, I went with using pure colors for my game for now until I'm able to complete the basics. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Here we are @walseb!
I've done a handful of tasks on the engine included in this PR. Notably, I fixed Textures.
Now you have
Texture2D fmtand you have to specify whichfmtyou want it to use. The possible formats are re-exported byGhengin.Core. For instance,Texture2D (RGBA8 UNorm)is tested by this example demo.A few other things here and there, but the demo is looking good :)