Dreikblack Posted June 10 Share Posted June 10 How should be but with red box behind yellow box Result with SetClearMode(CLEAR_COLOR), white fog color and black clear color #include "UltraEngine.h" #include "ComponentSystem.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { auto displays = GetDisplays(); auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); auto world = CreateWorld(); auto framebuffer = CreateFramebuffer(window); auto camera = CreateCamera(world); camera->SetClearColor(0.125); camera->SetFov(70); camera->SetPosition(0, 0, -3); auto light = CreateBoxLight(world); light->SetRotation(35, 45, 0); light->SetRange(-10, 10); Vec4 color(0, 1, 0, 1); //Create a box auto box = CreateBox(world); //Render to texture box->SetRenderLayers(2); box->SetColor(1, 0, 0, 1); auto unlitShader = LoadShaderFamily("Shaders/Unlit.fam"); auto boxMat = CreateMaterial(); boxMat->SetShaderFamily(unlitShader); box->SetMaterial(boxMat); auto cam2 = CreateCamera(world); cam2->SetClearColor(0, 0, 0, 0); cam2->SetRenderLayers(2); cam2->SetFov(camera->GetFov()); cam2->SetMatrix(camera->matrix); cam2->SetLighting(false); auto sz = framebuffer->GetSize(); auto texbuffer = CreateTextureBuffer(sz.x, sz.y); cam2->SetRenderTarget(texbuffer); //Display overlay auto sprite = CreateSprite(world, sz.x, sz.y); sprite->SetRenderLayers(4); auto mtl = CreateMaterial(); sprite->SetMaterial(mtl); mtl->SetTransparent(true); mtl->SetTexture(texbuffer->GetColorAttachment()); mtl->SetColor(1, 1, 1, 0.5); auto cam3 = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); cam3->SetClearMode(CLEAR_COLOR); cam3->SetRenderLayers(4); cam3->SetPosition(sz.x * 0.5f, sz.y * 0.5f, 0); cam3->SetLighting(false); cam3->SetFog(true); cam3->SetFogRange(0, 0); cam3->SetFogColor(1, 1, 1, 1); cam3->SetClearColor(0, 0, 0, 1); auto box2 = CreateBox(world, 5); box2->SetPosition(0, 0, 7); box2->SetColor(color); auto box3= CreateBox(world, 1); box3->SetPosition(-0.5, 0, -0.5); Vec4 color2(1, 1, 0, 1); box3->SetColor(color2); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer); } return 0; } Quote Link to comment Share on other sites More sharing options...
reepblue Posted June 11 Share Posted June 11 Have you tried camera->SetOrder()? Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
Dreikblack Posted June 11 Author Share Posted June 11 Yes, with setOrder(2) nothing changes, with cam3->SetOrder(-1); red box invisible at all Quote Link to comment Share on other sites More sharing options...
Dreikblack Posted June 12 Author Share Posted June 12 @Joshany new tips at this topic? Quote Link to comment Share on other sites More sharing options...
Josh Posted June 13 Share Posted June 13 I think you would have to create another camera in between "camera" and cam2 with the same characteristics as "camera" but rendering to the texture buffer. That would draw the depth information, then cam2 would render the transparent objects on that, and retain the depth info to discard fragments. It would be better if "camera" was rendering to a texture buffer, you could get the depth attachment, and attach that to the texture buffer cam2 is using. Then when cam2 starts drawing, it already has the depth info from the main camera. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Dreikblack Posted June 13 Author Share Posted June 13 12 hours ago, Josh said: It would be better if "camera" was rendering to a texture buffer, you could get the depth attachment, and attach that to the texture buffer cam2 is using. Then when cam2 starts drawing, it already has the depth info from the main camera. Same result but no lighting now for unknown reason: #include "UltraEngine.h" #include "ComponentSystem.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { auto displays = GetDisplays(); auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); auto world = CreateWorld(); auto framebuffer = CreateFramebuffer(window); auto sz = framebuffer->GetSize(); int MAIN_LAYER = 1, OUTPUT_LAYER = 2, EXTRA_LAYER = 4, EXTRA_OUTPUT_LAYER = 8; auto light = CreateBoxLight(world); light->SetRotation(35, 45, 0); light->SetRange(-10, 10); auto backBox = CreateBox(world, 5); backBox->SetPosition(0, 0, 7); backBox->SetColor(0, 1, 0, 1); auto betweenBox = CreateBox(world); betweenBox->SetRenderLayers(EXTRA_LAYER); betweenBox->SetColor(1, 0, 0, 1); auto unlitShader = LoadShaderFamily("Shaders/Unlit.fam"); auto boxMat = CreateMaterial(); boxMat->SetShaderFamily(unlitShader); betweenBox->SetMaterial(boxMat); auto frontBox = CreateBox(world, 1); frontBox->SetPosition(-0.5, 0, -0.5); frontBox->SetColor(1, 1, 0, 1); auto mainCameraInput = CreateCamera(world); mainCameraInput->SetPosition(0, 0, -3); mainCameraInput->SetRenderLayers(MAIN_LAYER); auto mainTextureBuffer = CreateTextureBuffer(sz.x, sz.y); mainCameraInput->SetRenderTarget(mainTextureBuffer); auto mainSprite = CreateSprite(world, sz.x, sz.y); mainSprite->SetRenderLayers(OUTPUT_LAYER); auto mainMaterial = CreateMaterial(); mainSprite->SetMaterial(mainMaterial); mainMaterial->SetTexture(mainTextureBuffer->GetColorAttachment()); auto mainCameraOutput = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); mainCameraOutput->SetPosition(sz.x * 0.5f, sz.y * 0.5f, 0); mainCameraOutput->SetRenderLayers(OUTPUT_LAYER); mainCameraOutput->SetLighting(true); //red transporent box render part auto extraCameraInput = CreateCamera(world); extraCameraInput->SetPosition(0, 0, -3); extraCameraInput->SetRenderLayers(EXTRA_LAYER); extraCameraInput->SetMatrix(mainCameraInput->matrix); extraCameraInput->SetLighting(false); auto extraTextureBuffer = CreateTextureBuffer(sz.x, sz.y); extraCameraInput->SetRenderTarget(extraTextureBuffer); auto extraSprite = CreateSprite(world, sz.x, sz.y); extraSprite->SetRenderLayers(EXTRA_OUTPUT_LAYER); auto extraMaterial = CreateMaterial(); extraSprite->SetMaterial(extraMaterial); extraMaterial->SetTransparent(true); extraMaterial->SetTexture(extraTextureBuffer->GetColorAttachment()); extraMaterial->SetColor(1, 1, 1, 0.5); auto extraCameraOutput = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); extraCameraOutput->SetPosition(sz.x * 0.5f, sz.y * 0.5f, 0); extraCameraOutput->SetRenderLayers(EXTRA_OUTPUT_LAYER); extraCameraOutput->SetClearMode(CLEAR_DEPTH); extraTextureBuffer->SetDepthAttachment(mainTextureBuffer->GetDepthAttachment()); extraCameraOutput->SetOrder(2); extraCameraOutput->SetLighting(false); //extraCameraOutput->SetHidden(true); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer); } return 0; } Quote Link to comment Share on other sites More sharing options...
Josh Posted June 13 Share Posted June 13 Is this what you are trying to do? #include "UltraEngine.h" #include "ComponentSystem.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { auto displays = GetDisplays(); auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); auto world = CreateWorld(); auto framebuffer = CreateFramebuffer(window); auto sz = framebuffer->GetSize(); int MAIN_LAYER = 1, OUTPUT_LAYER = 2, EXTRA_LAYER = 4, EXTRA_OUTPUT_LAYER = 8; auto light = CreateBoxLight(world); light->SetRotation(35, 45, 0); light->SetRange(-10, 10); auto backBox = CreateBox(world, 5); backBox->SetPosition(0, 0, 7); backBox->SetColor(0, 1, 0, 1); auto betweenBox = CreateBox(world); betweenBox->SetRenderLayers(EXTRA_LAYER); betweenBox->SetColor(1, 0, 0, 1); auto unlitShader = LoadShaderFamily("Shaders/Unlit.fam"); auto boxMat = CreateMaterial(); boxMat->SetShaderFamily(unlitShader); betweenBox->SetMaterial(boxMat); auto frontBox = CreateBox(world, 1); frontBox->SetPosition(-0.5, 0, -0.5); frontBox->SetColor(1, 1, 0, 1); auto mainCameraInput = CreateCamera(world); mainCameraInput->SetPosition(0, 0, -3); mainCameraInput->SetRenderLayers(MAIN_LAYER); auto mainTextureBuffer = CreateTextureBuffer(sz.x, sz.y); mainCameraInput->SetRenderTarget(mainTextureBuffer); auto mainSprite = CreateSprite(world, sz.x, sz.y); mainSprite->SetRenderLayers(OUTPUT_LAYER); auto mainMaterial = CreateMaterial(); mainSprite->SetMaterial(mainMaterial); mainMaterial->SetTexture(mainTextureBuffer->GetColorAttachment()); //red transporent box render part auto extraCameraInput = CreateCamera(world); extraCameraInput->SetPosition(0, 0, -3); extraCameraInput->SetRenderLayers(EXTRA_LAYER); extraCameraInput->SetMatrix(mainCameraInput->matrix); extraCameraInput->SetLighting(false); extraCameraInput->SetClearMode(CLEAR_COLOR); auto extraTextureBuffer = CreateTextureBuffer(sz.x, sz.y); extraTextureBuffer->SetDepthAttachment(mainTextureBuffer->GetDepthAttachment()); extraCameraInput->SetRenderTarget(extraTextureBuffer); auto extraSprite = CreateSprite(world, sz.x, sz.y); extraSprite->SetRenderLayers(EXTRA_OUTPUT_LAYER); auto extraMaterial = CreateMaterial(); extraSprite->SetMaterial(extraMaterial); extraMaterial->SetTransparent(true); extraMaterial->SetTexture(extraTextureBuffer->GetColorAttachment()); extraMaterial->SetColor(1, 1, 1, 0.5); auto mainCameraOutput = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); mainCameraOutput->SetPosition(sz.x * 0.5f, sz.y * 0.5f, 0); mainCameraOutput->SetRenderLayers(OUTPUT_LAYER); mainCameraOutput->SetLighting(false); auto extraCameraOutput = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); extraCameraOutput->SetPosition(sz.x * 0.5f, sz.y * 0.5f, 0); extraCameraOutput->SetRenderLayers(EXTRA_OUTPUT_LAYER); extraCameraOutput->SetClearMode(CLEAR_DEPTH); extraTextureBuffer->SetDepthAttachment(mainTextureBuffer->GetDepthAttachment()); //extraCameraOutput->SetOrder(2); extraCameraOutput->SetLighting(false); //extraCameraOutput->SetHidden(true); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer); } return 0; } 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted June 13 Share Posted June 13 Also, you don't need two orthographic cameras. Just place one sprite a little bit closer to the camera to make it appear on top. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Dreikblack Posted June 14 Author Share Posted June 14 3 hours ago, Josh said: Is this what you are trying to do? Yes! But why when camera rendering to a texture buffer it's so dark? Quote Link to comment Share on other sites More sharing options...
Josh Posted June 14 Share Posted June 14 I think that is a question for another day. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
SpiderPig Posted June 14 Share Posted June 14 2 hours ago, Dreikblack said: Yes! But why when camera rendering to a texture buffer it's so dark? If your showing the texture on a sprite make sure your using the "Unlit.fam". The default is PBR and it will try to light the sprite. 2 Quote Link to comment Share on other sites More sharing options...
Solution Dreikblack Posted June 14 Author Solution Share Posted June 14 Final working example: #include "UltraEngine.h" #include "ComponentSystem.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { auto displays = GetDisplays(); auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); auto world = CreateWorld(); auto framebuffer = CreateFramebuffer(window); auto sz = framebuffer->GetSize(); int MAIN_LAYER = 1, OUTPUT_LAYER = 2, EXTRA_LAYER = 4, EXTRA_OUTPUT_LAYER = 8; auto light = CreateBoxLight(world); light->SetRotation(35, 45, 0); light->SetRange(-10, 10); auto backBox = CreateBox(world, 5); backBox->SetPosition(0, 0, 7); backBox->SetColor(0, 1, 0, 1); auto betweenBox = CreateBox(world); betweenBox->SetRenderLayers(EXTRA_LAYER); betweenBox->SetColor(1, 0, 0, 1); auto unlitShader = LoadShaderFamily("Shaders/Unlit.fam"); auto boxMat = CreateMaterial(); boxMat->SetShaderFamily(unlitShader); betweenBox->SetMaterial(boxMat); auto betweenBox2 = CreateBox(world); betweenBox2->SetPosition(0.5, 0.5, 0); betweenBox2->SetRenderLayers(EXTRA_LAYER); betweenBox2->SetColor(1, 0, 0, 1); betweenBox2->SetMaterial(boxMat); auto frontBox = CreateBox(world, 1); frontBox->SetPosition(-0.5, 0, -0.5); frontBox->SetColor(1, 1, 0, 1); auto mainCameraInput = CreateCamera(world); mainCameraInput->SetPosition(0, 0, -3); mainCameraInput->SetRenderLayers(MAIN_LAYER); auto mainTextureBuffer = CreateTextureBuffer(sz.x, sz.y); mainCameraInput->SetRenderTarget(mainTextureBuffer); auto mainSprite = CreateSprite(world, sz.x, sz.y); mainSprite->SetRenderLayers(OUTPUT_LAYER); auto mainMaterial = CreateMaterial(); mainMaterial->SetShaderFamily(unlitShader); mainSprite->SetMaterial(mainMaterial); mainMaterial->SetTexture(mainTextureBuffer->GetColorAttachment()); auto mainCameraOutput = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); mainCameraOutput->SetPosition(sz.x * 0.5f, sz.y * 0.5f, 0); mainCameraOutput->SetRenderLayers(OUTPUT_LAYER); mainCameraOutput->SetLighting(false); mainCameraOutput->SetClearMode(CLEAR_DEPTH); //red transporent boxes render part auto extraCameraInput = CreateCamera(world); extraCameraInput->SetPosition(0, 0, -3); extraCameraInput->SetRenderLayers(EXTRA_LAYER); extraCameraInput->SetMatrix(mainCameraInput->matrix); extraCameraInput->SetClearMode(CLEAR_COLOR); extraCameraInput->SetLighting(false); auto extraTextureBuffer = CreateTextureBuffer(sz.x, sz.y); extraTextureBuffer->SetDepthAttachment(mainTextureBuffer->GetDepthAttachment()); extraCameraInput->SetRenderTarget(extraTextureBuffer); auto extraSprite = CreateSprite(world, sz.x, sz.y); extraSprite->SetPosition(0, 0, -0.00001); extraSprite->SetRenderLayers(OUTPUT_LAYER); auto extraMaterial = CreateMaterial(); extraMaterial->SetShaderFamily(unlitShader); extraSprite->SetMaterial(extraMaterial); extraMaterial->SetTransparent(true); extraMaterial->SetTexture(extraTextureBuffer->GetColorAttachment()); extraMaterial->SetColor(1, 1, 1, 0.5); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer); } return 0; } 2 Quote Link to comment Share on other sites More sharing options...
Dreikblack Posted June 14 Author Share Posted June 14 New problem with skybox: Added just: const WString remotepath = "https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets"; auto specmap = LoadTexture(remotepath + "/Materials/Environment/Storm/specular.dds"); auto diffmap = LoadTexture(remotepath + "/Materials/Environment/Storm/diffuse.dds"); world->SetEnvironmentMap(specmap, ENVIRONMENTMAP_BACKGROUND); world->SetEnvironmentMap(specmap, ENVIRONMENTMAP_SPECULAR); world->SetEnvironmentMap(diffmap, ENVIRONMENTMAP_DIFFUSE); How to disable this effect for display sprite or camera? Quote Link to comment Share on other sites More sharing options...
Josh Posted June 14 Share Posted June 14 You could use camera fog: camera->SetFogColor(0,0,0,1); camera->SetFogAngle(90,91); auto range = camera->GetRange().y; camera->SetFogRange(range * 0.98, range * 0.99); Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Dreikblack Posted June 14 Author Share Posted June 14 Now it's too dark For comparison without sprite and fog: #include "UltraEngine.h" #include "ComponentSystem.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { auto displays = GetDisplays(); auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); auto world = CreateWorld(); auto framebuffer = CreateFramebuffer(window); //Set environment maps const WString remotepath = "https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets"; auto specmap = LoadTexture(remotepath + "/Materials/Environment/Storm/specular.dds"); auto diffmap = LoadTexture(remotepath + "/Materials/Environment/Storm/diffuse.dds"); world->SetEnvironmentMap(specmap, ENVIRONMENTMAP_BACKGROUND); world->SetEnvironmentMap(specmap, ENVIRONMENTMAP_SPECULAR); world->SetEnvironmentMap(diffmap, ENVIRONMENTMAP_DIFFUSE); auto sz = framebuffer->GetSize(); int MAIN_LAYER = 1, OUTPUT_LAYER = 2, EXTRA_LAYER = 4; auto light = CreateBoxLight(world); light->SetRotation(35, 45, 0); light->SetRange(-10, 10); auto backBox = CreateBox(world, 5); backBox->SetPosition(0, 0, 7); backBox->SetColor(0, 1, 0, 1); auto betweenBox = CreateBox(world); betweenBox->SetRenderLayers(EXTRA_LAYER); betweenBox->SetColor(1, 0, 0, 1); auto unlitShader = LoadShaderFamily("Shaders/Unlit.fam"); auto boxMat = CreateMaterial(); boxMat->SetShaderFamily(unlitShader); betweenBox->SetMaterial(boxMat); auto betweenBox2 = CreateBox(world); betweenBox2->SetPosition(0.5, 0.5, 0); betweenBox2->SetRenderLayers(EXTRA_LAYER); betweenBox2->SetColor(1, 0, 0, 1); betweenBox2->SetMaterial(boxMat); auto frontBox = CreateBox(world, 1); frontBox->SetPosition(-0.5, 0, -0.5); frontBox->SetColor(1, 1, 0, 1); auto mainCameraInput = CreateCamera(world); mainCameraInput->SetPosition(0, 0, -3); mainCameraInput->SetRenderLayers(MAIN_LAYER); auto mainTextureBuffer = CreateTextureBuffer(sz.x, sz.y); mainCameraInput->SetRenderTarget(mainTextureBuffer); auto mainSprite = CreateSprite(world, sz.x, sz.y); mainSprite->SetRenderLayers(OUTPUT_LAYER); auto mainMaterial = CreateMaterial(); mainMaterial->SetShaderFamily(unlitShader); mainMaterial->SetTexture(mainTextureBuffer->GetColorAttachment()); mainSprite->SetMaterial(mainMaterial); auto mainCameraOutput = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); mainCameraOutput->SetPosition(sz.x * 0.5f, sz.y * 0.5f, 0); mainCameraOutput->SetRenderLayers(OUTPUT_LAYER); mainCameraOutput->SetLighting(false); mainCameraOutput->SetClearMode(CLEAR_DEPTH); //red transporent boxes render part auto extraCameraInput = CreateCamera(world); extraCameraInput->SetPosition(0, 0, -3); extraCameraInput->SetRenderLayers(EXTRA_LAYER); extraCameraInput->SetMatrix(mainCameraInput->matrix); extraCameraInput->SetClearMode(CLEAR_COLOR); extraCameraInput->SetLighting(false); extraCameraInput->SetFogColor(0, 0, 0, 1); extraCameraInput->SetFogAngle(90, 91); extraCameraInput->SetFog(true); auto range = extraCameraInput->GetRange().y; extraCameraInput->SetFogRange(range * 0.98, range * 0.99); auto extraTextureBuffer = CreateTextureBuffer(sz.x, sz.y); extraTextureBuffer->SetDepthAttachment(mainTextureBuffer->GetDepthAttachment()); extraCameraInput->SetRenderTarget(extraTextureBuffer); auto extraSprite = CreateSprite(world, sz.x, sz.y); extraSprite->SetPosition(0, 0, -0.00001); extraSprite->SetRenderLayers(OUTPUT_LAYER); extraSprite->SetShadows(false); auto extraMaterial = CreateMaterial(); extraMaterial->SetShaderFamily(unlitShader); extraMaterial->SetTransparent(true); extraMaterial->SetTexture(extraTextureBuffer->GetColorAttachment()); extraMaterial->SetColor(1, 1, 1, 0.5); extraSprite->SetMaterial(extraMaterial); extraSprite->SetHidden(false); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer); } return 0; } Quote Link to comment Share on other sites More sharing options...
Josh Posted June 15 Share Posted June 15 Oh, I see. The fog is turning the sprite color black, and then that gets overlaid on top of the screen, right? I did not have any of these problems in my outline shader because I just used the depth buffer to decide whether the output should be white or black. But you are passing through the color buffer so that is more complicated. Maybe the only way is a per-camera setting to disable the skybox if it has been set. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Dreikblack Posted June 15 Author Share Posted June 15 I guess no such setting exist atm? Quote Link to comment Share on other sites More sharing options...
Dreikblack Posted June 16 Author Share Posted June 16 On 6/15/2024 at 6:42 AM, Josh said: per-camera setting to disable the skybox if it has been set. Estimated time when such method will be added? Quote Link to comment Share on other sites More sharing options...
Josh Posted June 16 Share Posted June 16 I don't know. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted June 16 Share Posted June 16 You could also put a very large black plane in front of the camera to block to sky out, and make it only appear in the second camera. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Dreikblack Posted June 16 Author Share Posted June 16 How it can be done if this camera render to sprite everything that it can see? Quote Link to comment Share on other sites More sharing options...
Josh Posted June 16 Share Posted June 16 Place it behind the other objects, and use the renderlayer so it only appears in one camera. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Dreikblack Posted June 16 Author Share Posted June 16 How it can be behind other objects if it should be in front of the camera? 2 minutes ago, Josh said: use the renderlayer Thats what i do for my intended objects and this camera does SetRenderTarget so everything is visible in this layer in final render Quote Link to comment Share on other sites More sharing options...
Josh Posted June 16 Share Posted June 16 This is what I mean : Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Dreikblack Posted June 16 Author Share Posted June 16 But it will be visible for main camera as well because second camera render target to sprite that visible in final render so skybox will be visible in a result at all, not just for second camera. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.