vertex shader textures

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: vertex shader textures

Post by hendu »

Probably not in irr, since I get pink?
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: vertex shader textures

Post by Nadro »

Which version of Irrlicht do You use? Some time ago (~3-4 months) we had a bug with mipmaps in OpenGL but it's already fixed.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Bl00drav3n
Posts: 48
Joined: Sun Apr 22, 2012 11:55 pm
Location: Vienna
Contact:

Re: vertex shader textures

Post by Bl00drav3n »

I am using the latest trunk version right now. I will write an OpenGL example and test it again.
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: vertex shader textures

Post by Nadro »

So it looks like a driver bug because I also see a pink quad (Radeon HD3870 + Catalyst 12.4).
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Bl00drav3n
Posts: 48
Joined: Sun Apr 22, 2012 11:55 pm
Location: Vienna
Contact:

Re: vertex shader textures

Post by Bl00drav3n »

Yes I tested it, there is a bug with glGenerateMipmap(), it seems that it doesn't like 1px textures. In Irrlicht this method only gets called until the EVDF_FRAMEBUFFER_OBJECT and EVDF_MIP_MAP_AUTO_UPDATE features are available and GL_SGIS_generate_mipmap was defined (last one was of course defined in glext.h). Otherwise it will fall back to either calling glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE) or doesn't use mipmaps at all.
Interestingly enough with GL_TEXTURE_MIN_FILTER set to GL_LINEAR_MIPMAP_NEAREST, the 1px texture will be used at all mipmap levels, while a 2x2 px texture will cause the driver to disable texturing. Very strange *lol*

If somebody wants to test this: glGenerateMipmap has been core since OGL3.0 but on Windows I had to use the latest glew lib (1.7.0), the old version had a bug where the compiler didn't find the reference to that function. I am using Catalyst 12.6.
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: vertex shader textures

Post by hendu »

I'm using 1.7 branch + various changes, FWIW.

Anyway, if you have a small GL-only example that reproduces it, please post it to AMD's bugzilla.
Bl00drav3n
Posts: 48
Joined: Sun Apr 22, 2012 11:55 pm
Location: Vienna
Contact:

Re: vertex shader textures

Post by Bl00drav3n »

I just filed a bug report. ;)
Granyte
Posts: 850
Joined: Tue Jan 25, 2011 11:07 pm
Contact:

Re: vertex shader textures

Post by Granyte »

http://msdn.microsoft.com/en-us/library ... p/bb206339

I found this about how vertex texture works in dx9 but i don't see how that is usefull to integrate them into irrlicht
Last edited by Granyte on Sun Jul 08, 2012 4:01 pm, edited 1 time in total.
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: vertex shader textures

Post by mongoose7 »

Could you fix the link? Just hover on it an you will see what I mean.
fmx

Re: vertex shader textures

Post by fmx »

remove the (v=vs.85) and you're good
here's the link: http://msdn.microsoft.com/en-us/library ... p/bb206339
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: vertex shader textures

Post by hybrid »

Looks like we only need to have a proper texture bind, which should usually be automatically. Maybe you just need the correct texture sample call?!
Granyte
Posts: 850
Joined: Tue Jan 25, 2011 11:07 pm
Contact:

Re: vertex shader textures

Post by Granyte »

Vertex texture are indeed working in DX9 the issue was not irrlicht but the way vertex texture are handeled in DX9

http://robertwrose.com/2005/05/vertex-t ... notes.html
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: vertex shader textures

Post by hendu »

Yikes, weird and limited. Just compare to how easy it was in opengl ;)
Granyte
Posts: 850
Joined: Tue Jan 25, 2011 11:07 pm
Contact:

Re: vertex shader textures

Post by Granyte »

that's why i'm tryng to port a dx11 driver to the svn

dx9 is way outdated


Edit finaly NOP vertex texture fetch is not working even if the code compile it seem no texture is assigned to the register
Granyte
Posts: 850
Joined: Tue Jan 25, 2011 11:07 pm
Contact:

Re: vertex shader textures

Post by Granyte »

Damnit 4 days later and i still can't find the place where the texture a are binded to thier register in the current dx9 driver

The vertex texture register are diferent then the pixel ones and need to be assigned separatly but i can't even find where they are originaly assigned to pixel shader
Post Reply