Skip to content

Conversation

@alt-romes
Copy link
Owner

Screenshot 2025-11-22 at 17 27 07

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 fmt and you have to specify which fmt you want it to use. The possible formats are re-exported by Ghengin.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 :)

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.
@alt-romes alt-romes mentioned this pull request Nov 22, 2025
@alt-romes alt-romes merged commit 4cacee8 into master Nov 22, 2025
1 check passed
@walseb
Copy link
Contributor

walseb commented Nov 22, 2025

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants