Search found 57 matches
- Thu Feb 01, 2024 7:16 pm
- Forum: Beginners Help
- Topic: Problem with overlaying regular texture with RTT.
- Replies: 3
- Views: 1385
Re: Problem with overlaying regular texture with RTT.
Thanks. I read thoroughly all materials types documented in EMaterialTypes.h file since the doc in the engine itself is more actual than that one which the website says. I really didn't find any suitable type that would just combine two textures (what is very wonderful as other materials can combine...
- Wed Jan 31, 2024 7:48 pm
- Forum: Beginners Help
- Topic: Problem with overlaying regular texture with RTT.
- Replies: 3
- Views: 1385
Problem with overlaying regular texture with RTT.
I have a mesh scene node (mirror) with two materials. The second one contains two texture layers. In the first layer I add a render target texture (created using IVideoDriver::addRenderTargetTexture) in which the camera renders from the position of the mirror node and from that direction where the m...
- Mon Sep 18, 2023 10:29 pm
- Forum: Off-topic
- Topic: Leaving Irrlicht?...
- Replies: 22
- Views: 6059
Re: Leaving Irrlicht?...
This will be probably a bit offtopic, but I am interested in knowing reasons of disintegrating of the Irrlicht development team. The single active developer and the forum member so far is CuteAlien. The lastest feature release (1.8.0) is more than ten years old. The lastest bugfix release is also al...
- Fri Sep 01, 2023 10:54 am
- Forum: Beginners Help
- Topic: Blending lights rays with base texture.
- Replies: 8
- Views: 2100
Re: Blending lights rays with base texture.
The red light amount is the same as the green one in my scene. The actual problem was the red light has the green and blue components null, so in the result of the blending the light color with the scene color, the total color gets semitransparent with the red tint. I could fix that by calculating t...
- Wed Aug 16, 2023 9:11 pm
- Forum: Beginners Help
- Topic: Blending lights rays with base texture.
- Replies: 8
- Views: 2100
Re: Blending lights rays with base texture.
I've come up with how to solve this issue finally, only partially, because now although the lamps look like opaque, but their rays became very faint. I caulculate the alpha as a ratio of the current fragment's luminance and the original lamp color luminance: float luminance = dot(color*255.0, vec3(0...
- Sun Aug 13, 2023 8:49 pm
- Forum: Beginners Help
- Topic: Blending lights rays with base texture.
- Replies: 8
- Views: 2100
Re: Blending lights rays with base texture.
Do you mean so? Always have alpha = 1.0 independing on the mixed alpha?
In any case that doesn't change anything.
Code: Select all
vec4 color = base_color + rays_color;
gl_FragColor = vec4(vec3(color), 1.0);
- Sun Aug 13, 2023 5:16 pm
- Forum: Beginners Help
- Topic: Blending lights rays with base texture.
- Replies: 8
- Views: 2100
Blending lights rays with base texture.
I try to combine in the shader which renders the screen quad the total rays texture with the base texture. The first one contains all simple rendered cube light sources emitting godrays (algorithm based on this implementation: https://lokeshsharma97.wordpress.com/2017/08/04/god-rays-opengl/ the only...
- Sat Aug 05, 2023 10:41 am
- Forum: Beginners Help
- Topic: Defining BlendFactor results to no rendering.
- Replies: 2
- Views: 1895
Re: Defining BlendFactor results to no rendering.
Thanks! Setting EMT_TRANSPARENT_ALPHA_CHANNEL for the base shader material is the only thing that solved the problem.
- Sat Aug 05, 2023 12:02 am
- Forum: Beginners Help
- Topic: Defining BlendFactor results to no rendering.
- Replies: 2
- Views: 1895
Defining BlendFactor results to no rendering.
Sorry for very frequent asking here, but it really doesn't work for an obscure reason although it really should do. I bound an own shader to my material which belongs to a mesh scene node and enabled the blend operation EBO_ADD since this material is intended to be transparent (that shader calculate...
- Thu Aug 03, 2023 7:12 am
- Forum: Beginners Help
- Topic: How to sample depth texture in GLSL?
- Replies: 8
- Views: 2222
Re: How to sample depth texture in GLSL?
Now works too to my wonder. The single reason which I can find is I initialized core::array wrong (when I added ITextures to there, I used direct [] operator, now I added it by push_back()), because actually my current code and the non-working code before are absolutely identical except that thing. ...
- Tue Aug 01, 2023 11:06 am
- Forum: Beginners Help
- Topic: How to sample depth texture in GLSL?
- Replies: 8
- Views: 2222
Re: How to sample depth texture in GLSL?
Hmm, the MRT feature doesn't work to me although queryFeature(video::EVDF_MULTIPLE_RENDER_TARGETS) reports true. I set core::array with two RT textures, both ones are color format A16B16G16R16F in IRenderTarget::setTexture() without the third parameter and then in the end of the fragment shader I as...
- Mon Jul 31, 2023 9:08 am
- Forum: Beginners Help
- Topic: How to sample depth texture in GLSL?
- Replies: 8
- Views: 2222
Re: How to sample depth texture in GLSL?
Hmm, I thought now about multiple render targets. What if I have two textures (color and its depth) and I assign two outputs in gl_FragData, one for color, another one for depth? Will depth testing be implemented automatically also for depth texture? As I have two passes and in each of them I send t...
- Sun Jul 30, 2023 8:46 pm
- Forum: Beginners Help
- Topic: How to sample depth texture in GLSL?
- Replies: 8
- Views: 2222
Re: How to sample depth texture in GLSL?
Thanks for reply. I've just added an additional render pass (render to my own depth texture necessary objects and then pass it to the end shader to sample from that).
- Sun Jul 30, 2023 1:13 pm
- Forum: Beginners Help
- Topic: How to sample depth texture in GLSL?
- Replies: 8
- Views: 2222
How to sample depth texture in GLSL?
I have a problem with sending and sampling a depth texture in GLSL fragment shader. I generate it in D16 color format, set it in the render target as the second parameter, then render and after send it in the fragment shader as sampler2D: video::ITexture* base_t = vdrv->addRenderTargetTexture(core::...
- Fri Jul 28, 2023 7:19 pm
- Forum: Beginners Help
- Topic: How to generate and send cubemap in shader correctly?
- Replies: 2
- Views: 1792
Re: How to generate and send cubemap in shader correctly?
Thanks. That has actually fixed the problem. Like addTextureCubemap() can not accept render target textures, only ordinary ones or I converted to video::IImage's incorrectly. I took the example of the convertation from here: viewtopic.php?f=9&t=22268