Search found 226 matches

by pandoragami
Wed Feb 07, 2018 12:15 am
Forum: Advanced Help
Topic: Updating the gpu buffer and how drawVertexPrimitiveList...
Replies: 3
Views: 843

Re: Updating the gpu buffer and how drawVertexPrimitiveList.

drawVertexPrimitiveList does not check if anything changed compared to any previous call - each call is on it's own. If you want buffers which stay on the gpu use the IMeshBuffer interface which has a function setHardwareMappingHint. Using drawVertexPrimitiveList in conjunction with imeshbuffers wo...
by pandoragami
Tue Feb 06, 2018 12:41 am
Forum: Advanced Help
Topic: Updating the gpu buffer and how drawVertexPrimitiveList...
Replies: 3
Views: 843

Updating the gpu buffer and how drawVertexPrimitiveList...

Hello, This question relates to using shaders in a specific way where the vertices and indices aren't updated in every frame inside the call for drawVertexPrimitiveList and the positions of the vertices are updated with a time variable on the gpu in the shader only (not the cpu). The question I have...
by pandoragami
Fri Jan 19, 2018 6:21 pm
Forum: Advanced Help
Topic: SOLVED Trouble blending textured billboards with shader.
Replies: 14
Views: 1948

Re: SOLVED Trouble blending textured billboards with shader.

Nevermind, the blending isn't turning off the vertex colors, it's the shader itself that doesn't seem to change the color of the polygon as passed in this part    Buffer.Vertices.push_back(video::S3DVertex( x,y,z, 1,1,0,video::SColor(0,r,g,b), 0, 1));     Buffer.Vertices.push_back(video::S3DVertex( ...
by pandoragami
Fri Jan 19, 2018 3:35 am
Forum: Advanced Help
Topic: SOLVED Trouble blending textured billboards with shader.
Replies: 14
Views: 1948

Re: SOLVED Trouble blending textured billboards with shader.

I'd say on the contrary, you better have thousands or else it is wasted bandwidth,The largest overhead in Irrlicht billboards is transmiting them to the GPU, on the paper, it costs almost the same transmiting one than transmiting 6000 together. You can calculate billboards on the CPU and have that ...
by pandoragami
Wed Jan 17, 2018 10:06 pm
Forum: Advanced Help
Topic: SOLVED Trouble blending textured billboards with shader.
Replies: 14
Views: 1948

Re: SOLVED Trouble blending textured billboards with shader.

MartinVee wrote:Did you benchmark your solution versus the regular Irrlicht Billboard?
Nope, did this mostly for concept, would you know if Irrlicht runs its billboard on cpu or gpu?
by pandoragami
Wed Jan 17, 2018 12:32 am
Forum: Advanced Help
Topic: SOLVED Trouble blending textured billboards with shader.
Replies: 14
Views: 1948

Re: Trouble blending textured billboards with shader.

No, but you're mistaking what fragment shaders do with the whole blending process. you can't perform blending on a fragment shader, they are things completely diferent. For blending to work with fragment shaders, in the shader compilation, you have to provide a material type that uses any sort of b...
by pandoragami
Sun Jan 14, 2018 8:13 pm
Forum: Advanced Help
Topic: SOLVED Trouble blending textured billboards with shader.
Replies: 14
Views: 1948

Re: Trouble blending textured billboards with shader.

Mel wrote:Hmm... truth be said, i never did a vertex shader without a corresponding pixel shader, so no idea, sorry :/
Have you tried doing any blending in the pixel shader? Just wondering if maybe that would be the alternative to depth sorting and such, I've read here and there on other forums.
by pandoragami
Sun Jan 14, 2018 6:19 pm
Forum: Advanced Help
Topic: SOLVED Trouble blending textured billboards with shader.
Replies: 14
Views: 1948

Re: Trouble blending textured billboards with shader.

The blending is a process independent from the shading, that is what shaders are for. If you were to do the blending in the shader, the final process would end being much much more complex than just allowing the API do the blending for you, for the same results, and no gain at all. If the blending ...
by pandoragami
Sun Jan 14, 2018 2:52 pm
Forum: Advanced Help
Topic: SOLVED Trouble blending textured billboards with shader.
Replies: 14
Views: 1948

Re: Trouble blending textured billboards with shader.

When you compile a shader, the renderstate is picked up from the material type you set as reference, including the blending. The shader_1_MaterialType2 inherits the video::EMT_TRANSPARENT_ADD_COLOR renderstate, whereas the shader_1_MaterialType1 inherits the video::EMT_SOLID renderstate, thus, when...
by pandoragami
Sun Jan 14, 2018 1:55 am
Forum: Advanced Help
Topic: SOLVED Trouble blending textured billboards with shader.
Replies: 14
Views: 1948

SOLVED Trouble blending textured billboards with shader.

Hello, Here's a picture of the problem, https://i.imgur.com/LT36iNY.png Basically I managed to get textures onto quads for billboards and then I managed to get the shader to rotate them to face the camera but now the blending is not quite normal as it should be. I'm just not sure how to go about mak...
by pandoragami
Wed Dec 27, 2017 5:31 pm
Forum: Beginners Help
Topic: Attaching directional light node to createFlyCircleAnimator?
Replies: 4
Views: 616

Re: Attaching directional light node to createFlyCircleAnima

Now I found the problem, there was a blank space in the code where the unique identifier for the light direction is passed here   if (UseHighLevelShaders)                 services->setVertexShaderConstant(" lightDir", reinterpret_cast<f32*>(&dir), 3);   That extra whitespace before the...
by pandoragami
Tue Dec 26, 2017 8:30 pm
Forum: Advanced Help
Topic: SOLVED Bump map shader, what is the normal matrix needed?
Replies: 1
Views: 958

Re: SOLVED Bump map shader, what is the normal matrix needed

I managed to solve it using the code from this site https://www.gamedev.net/forums/topic/521915-normal-mapping-without-precomputed-tangents/ It now works, there might be lots of unneeded code in the source and shaders but it's all for simplicity to show step by step what's happening. main.cpp   #inc...
by pandoragami
Fri Dec 22, 2017 2:19 am
Forum: Advanced Help
Topic: SOLVED Bump map shader, what is the normal matrix needed?
Replies: 1
Views: 958

SOLVED Bump map shader, what is the normal matrix needed?

Hello, I tried to make this http://apoorvaj.io/exploring-bump-mapping-with-webgl.html#toc8 tutorial work with Irrlicht and so far I'm not sure what is the variable uniform mat4 norm_mtx;// in bump.vert I'm guessing it's the inverse transpose of the world matrix supposedly called the normal matrix, I...
by pandoragami
Wed Dec 20, 2017 2:42 am
Forum: Beginners Help
Topic: [Solved] Need help with fire shader, animate with time?
Replies: 4
Views: 716

Re: Need help with fire shader, unable to animate with time?

I made a small change in the fragment shader

Code: Select all

 
 
vec4 bx2( vec4 x)
{
   return 1.05 * x - 2.1;
}
 
 
and now it looks like the flame is centered, anyone have other ideas feel free to chime in.
by pandoragami
Wed Dec 20, 2017 2:18 am
Forum: Beginners Help
Topic: [Solved] Need help with fire shader, animate with time?
Replies: 4
Views: 716

Re: Need help with fire shader, unable to animate with time?

you forgot to declare "time" as uniform (possibly a typo on your end). OMG! I spent 2 to 3 hours now trying to solve this. This is hilarious, but hey, without your help I might have spent another day dealing with syntax. I do have one more question. Is there a way to shift the flame from ...