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
[IMPL] HelloSmoke #122
[IMPL] HelloSmoke #122
Conversation
f250e9b
to
eec966a
Compare
33994a0
to
02ab124
Compare
Is a clone of HelloTexture3D. Then added ability to allocate Textures with specified texel format
const uint TexturePixels = TextureDz * TextureDepth; | ||
const uint TextureSize = TexturePixels * 4; | ||
|
||
var texture3D = graphicsContext.Device.MemoryAllocator.CreateTexture(GraphicsTextureKind.ThreeDimensional, GraphicsResourceCpuAccess.None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same feedback as on #126 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a local variable before the call and make the call one line with the variable at the end of the line.
float scale = 2 * MathF.Abs(0.5f - radius); | ||
// random value scaled by the above | ||
float rand = (float)random.NextDouble(); | ||
if (!isQuickAndDirty && rand < 0.99) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!isQuickAndDirty && rand < 0.99) | |
if (!isQuickAndDirty && (rand < 0.99)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also needs the brace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and with { ... } after the if, as in the comment above I assume.
Sample that uses a 3d Texture of float values which are used by the shaders to create an impression of smoke. Introduces over the prior samples specifying a custom texel type and converting in the shaders from single value intensities to RGB.