ShaderNodes: Add TextureEdit dialog
This commit is contained in:
@@ -11,12 +11,15 @@ PreviewValues QuadPreview::GetPreview(InputRole role, std::size_t roleIndex) con
|
||||
return dummy;
|
||||
}
|
||||
|
||||
PreviewValues uv(128, 128);
|
||||
PreviewValues uv(128, 128);
|
||||
|
||||
for (std::size_t y = 0; y < 128; ++y)
|
||||
float invWidth = 1.f / uv.GetWidth();
|
||||
float invHeight = 1.f / uv.GetHeight();
|
||||
|
||||
for (std::size_t y = 0; y < uv.GetHeight(); ++y)
|
||||
{
|
||||
for (std::size_t x = 0; x < 128; ++x)
|
||||
uv(x, y) = Nz::Vector4f(x / 128.f, y / 128.f, 0.f, 1.f);
|
||||
for (std::size_t x = 0; x < uv.GetWidth(); ++x)
|
||||
uv(x, y) = Nz::Vector4f(x * invWidth, y * invHeight, 0.f, 1.f);
|
||||
}
|
||||
|
||||
return uv;
|
||||
|
||||
Reference in New Issue
Block a user