Skip to content

Conversation

lursz
Copy link
Contributor

@lursz lursz commented Aug 28, 2025

Screen.Recording.2025-09-02.at.16.33.23.mov

@lursz lursz changed the base branch from main to release August 28, 2025 15:14
Copy link

github-actions bot commented Aug 29, 2025

pkg.pr.new

packages
Ready to be installed by your favorite package manager ⬇️

https://pkg.pr.new/software-mansion/TypeGPU/typegpu@c70d42192ee1d48c7e00e215a645d0ae606916e1
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/noise@c70d42192ee1d48c7e00e215a645d0ae606916e1
https://pkg.pr.new/software-mansion/TypeGPU/unplugin-typegpu@c70d42192ee1d48c7e00e215a645d0ae606916e1

benchmark
view benchmark

commit
view commit

@reczkok reczkok changed the title Docs: Clouds example docs: Clouds example Aug 29, 2025
@lursz
Copy link
Contributor Author

lursz commented Sep 4, 2025

Reverted perlin noise, due to performance issues (both impl with texture and without), even when using cache.

@lursz lursz marked this pull request as ready for review September 16, 2025 13:14
@lursz
Copy link
Contributor Author

lursz commented Sep 16, 2025

Once approved, I will add example resolution test for it.

@lursz lursz requested a review from Copilot September 16, 2025 13:15
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Why was seven afraid of ten?

@software-mansion software-mansion deleted a comment from Copilot AI Sep 16, 2025
@software-mansion software-mansion deleted a comment from Copilot AI Sep 16, 2025
@software-mansion software-mansion deleted a comment from Copilot AI Sep 16, 2025
@software-mansion software-mansion deleted a comment from Copilot AI Sep 16, 2025
Copy link
Contributor

@aleksanderkatan aleksanderkatan left a comment

Choose a reason for hiding this comment

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

To unlock "approve", submit one "example resolution test" to the 🏧

Comment on lines +24 to +28
export const raymarchSlot = tgpu.slot<TgpuFn>();
export const sampledViewSlot = tgpu.slot<TgpuSampledTexture<'2d', d.F32>>();
export const samplerSlot = tgpu.slot<TgpuSampler>();
export const timeAccess = tgpu['~unstable'].accessor(d.f32);
export const resolutionAccess = tgpu['~unstable'].accessor(d.vec2f);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not use these resources directly? What is the advantage of using these? Is this for abstraction?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pretty much. I briefly tried to introduce cloud profiles into the example, but all my endeavours came out looking ugly. I left the abstraction for future extensibility and better file fragmentation

Comment on lines +56 to +68
const lit = d.vec3f(
albedo.x * lighting.x,
albedo.y * lighting.y,
albedo.z * lighting.z,
);
const premul = d.vec4f(
lit.x * density,
lit.y * density,
lit.z * density,
density,
);

res = std.add(res, std.mul(premul, LIGHT_ABSORPTION - res.w));
Copy link
Contributor

Choose a reason for hiding this comment

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

nit

Suggested change
const lit = d.vec3f(
albedo.x * lighting.x,
albedo.y * lighting.y,
albedo.z * lighting.z,
);
const premul = d.vec4f(
lit.x * density,
lit.y * density,
lit.z * density,
density,
);
res = std.add(res, std.mul(premul, LIGHT_ABSORPTION - res.w));
const lit = albedo.mul(lighting);
const premul = d.vec4f(lit, 1).mul(density);
res = res.add(premul.mul(LIGHT_ABSORPTION - res.w));

Copy link
Contributor

Choose a reason for hiding this comment

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

Sometimes there are clearly visible vertical or horizontal divisions, do you know where they come from and if they are fixable?

image

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