Skip to content

Commit 1d1148c

Browse files
committed
Fix Curve node when running on GPU
1 parent d424fdb commit 1d1148c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

engine/gpu/compute_shader_resource.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ void ComputeShaderResourceInternal::create_texture_2d(RenderingDevice &rd, const
148148
float *wd = (float *)wd8;
149149

150150
for (unsigned int i = 0; i < width; ++i) {
151-
const float t = curve_domain.min + curve_domain_range + i / static_cast<float>(width);
151+
const float t = curve_domain.min + curve_domain_range * (i / static_cast<float>(width));
152152
// TODO Thread-safety: `sample_baked` can actually be a WRITING method! The baked cache is lazily created
153153
wd[i] = curve.sample_baked(t);
154154
// print_line(String("X: {0}, Y: {1}").format(varray(t, wd[i])));

0 commit comments

Comments
 (0)