~ WIP port emscripen (WebGL)
This commit is contained in:
@@ -468,7 +468,7 @@ int main()
|
||||
std::vector<std::shared_ptr<Nz::ShaderBinding>> bloomBlendShaderBinding(BloomSubdivisionCount);
|
||||
|
||||
// Gamma correction
|
||||
|
||||
|
||||
Nz::RenderPipelineLayoutInfo fullscreenPipelineLayoutInfo;
|
||||
|
||||
fullscreenPipelineLayoutInfo.bindings.push_back({
|
||||
@@ -683,7 +683,7 @@ int main()
|
||||
"Color",
|
||||
Nz::PixelFormat::RGBA8
|
||||
});
|
||||
|
||||
|
||||
normalTexture = graph.AddAttachment({
|
||||
"Normal",
|
||||
Nz::PixelFormat::RGBA8
|
||||
@@ -698,7 +698,7 @@ int main()
|
||||
"Depth buffer",
|
||||
depthStencilFormat
|
||||
});
|
||||
|
||||
|
||||
depthBuffer2 = graph.AddAttachment({
|
||||
"Depth buffer",
|
||||
depthStencilFormat
|
||||
@@ -891,7 +891,7 @@ int main()
|
||||
forwardPass.SetDepthStencilInput(depthBuffer1);
|
||||
forwardPass.SetDepthStencilOutput(depthBuffer2);
|
||||
|
||||
|
||||
|
||||
Nz::FramePass& occluderPass = graph.AddPass("Occluder pass");
|
||||
occluderPass.SetCommandCallback([&](Nz::CommandBufferBuilder& builder, const Nz::FramePassEnvironment& env)
|
||||
{
|
||||
@@ -979,7 +979,7 @@ int main()
|
||||
|
||||
bloomBlurPassHorizontal.AddInput((i == 0) ? bloomBrightOutput : bloomTextures[bloomTextureIndex++]);
|
||||
bloomBlurPassHorizontal.AddOutput(bloomTextures[bloomTextureIndex]);
|
||||
|
||||
|
||||
Nz::FramePass& bloomBlurPassVertical = graph.AddPass("Bloom pass - gaussian blur #" + std::to_string(i) + " - vertical");
|
||||
bloomBlurPassVertical.SetCommandCallback([&, i](Nz::CommandBufferBuilder& builder, const Nz::FramePassEnvironment& env)
|
||||
{
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
target("PBR")
|
||||
add_deps("NazaraGraphics")
|
||||
add_files("main.cpp")
|
||||
|
||||
if is_plat("wasm") then
|
||||
add_ldflags("--preload-file assets/", {force = true})
|
||||
end
|
||||
|
||||
@@ -98,7 +98,7 @@ int main()
|
||||
longTextArea->SetBackgroundColor(Nz::Color::White());
|
||||
longTextArea->SetTextColor(Nz::Color::Black());
|
||||
longTextArea->SetText("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum");
|
||||
|
||||
|
||||
Nz::ScrollAreaWidget* scrollBarWidget = canvas2D.Add<Nz::ScrollAreaWidget>(longTextArea);
|
||||
scrollBarWidget->SetPosition(1400.f, 800.f);
|
||||
scrollBarWidget->Resize({ 512.f, 256.f });
|
||||
|
||||
Reference in New Issue
Block a user