njord Posted October 26, 2011 Share Posted October 26, 2011 Hello guys. We normally render our scene with framework functions. But for our mirrors, due to performance problems, we get the render with renderworld() function. Ofcourse by creating an extra buffer and using renderlights() function, we can render light sources too. But how to render emissive/glossive surfaces in addition ? Basically I want this : use renderworld(), render light sources, see traffic light working all together. Traffic light model is in LESDK 2.5\Models\Props\Switch. It uses a switch.frag to make the lights glow in darkness by using mesh color as a parameter to shader, on line 183 : gl_FragData[3] = texture2D(texture2,texcoord)*fragcolor.x + texture2D(texture3,texcoord)*(1.0-fragcolor.x); Thanks in advance Quote Link to comment Share on other sites More sharing options...
njord Posted October 31, 2011 Author Share Posted October 31, 2011 up Quote Link to comment Share on other sites More sharing options...
njord Posted November 15, 2011 Author Share Posted November 15, 2011 Basically, when our application is like this : RegisterAbstractPath("./xxx"); Graphics(800,600,0); TFramework framework = CreateFramework(); TLayer layer = GetFrameworkLayer(0); TCamera defaultCam = GetLayerCamera(layer); BP L = GetLuaState(); lua_pushobject(L,framework); lua_setglobal(L,"fw"); lua_pop(L,1); SetGodRays(1); SetHDR(1); SetSSAO(1); SetBloom(1); SetAntialias(1); SetShadowQuality(1); SetTextureQuality(1); OcclusionCulling(1); TEntity ent = LoadModel(std::string("abstract::switch.gmf").c_str()); While(true) { UpdateFramework(); RenderFramework(); } the switch.gmf emissive/glossive greenlight is lit by default. When the RenderFramework(); is changed to RenderWorld(); I cannot see any emissive greenlight. You can see the difference in the below screenshot. The traffic light on the left is rendered with RenderWorld() command, the one on the right is rendered with RenderFramework() command. What I am asking is, what is the minimum code required to make emissive surfaces work, using RenderWorld(); . Afterall, RenderFramework() uses RenderWorld(), RenderLights() etc. on the background right ? Thanks all PS : We are insisting on using RenderWorld for our mirrors, because the performance drops immensely otherwise. However we need to see emissive surfaces such as vehicle signals and traffic lights from our mirrors. Also we need to see light sources, which can be implemented easily by using RenderLights & RenderWorld. screenshot : Quote Link to comment Share on other sites More sharing options...
njord Posted November 28, 2011 Author Share Posted November 28, 2011 anyone ? tell me if i am not clear enough mates, thnx. by the way, we can try to help with mirror implementation if anyone needs mirrors in LE. 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.