Jump to content

[SOLVED] trying to use WidgetSpriteShader in a ObjectGui


photo

Recommended Posts

Hi!

 

I've prepared a sample for you, please find it in the attachments.

hi Bob:

    thanks for sending the sample. Although, i didn't mean widgetsprite, i mean widgetspriteshader. i could make widgetsprite, but in our case, we have to make widgetspriteshader working.

thanks

Link to comment

Oh, it's my mistake. Please take my apologies. :)

 

Looks like it's a bug (there're also not working in DX 11). So I can suggest you to use ObjectGuiMesh, just with flat plane mesh. Here's updated version which you can in the attachments (I took mesh from samples so all you need to do is replace that mesh to flat plane).

 

 

objectguimesh_spriteshader.zip

Link to comment
  • 2 weeks later...

There is one more thing I want to mention!

 

If you still want to stick with ObjectGui then you need to write your own custom vertex shader which will use s_gui_transform[3] to transform vertices. See data/core/shaders/default/gui/vertex_base.shader file for reference.

Link to comment
  • 2 weeks later...

Oh, it's my mistake. Please take my apologies. :)

 

Looks like it's a bug (there're also not working in DX 11). So I can suggest you to use ObjectGuiMesh, just with flat plane mesh. Here's updated version which you can in the attachments (I took mesh from samples so all you need to do is replace that mesh to flat plane).

hi Bob:

   Could you confirm this bug will be fix in the next release? we have to use widgetspriteshader in objectgui.

thanks

Link to comment

Hi!

 

There'll be some fixes in ObjectGui in 2.0 beta yet the principle will remain the same: you have to write custom vertex shader in order to use it with post effects. Have you used my advice I mentioned earlier about that?

 

Also, why don't you want to use ObjectGuiMesh?

Link to comment

Hi!

 

There'll be some fixes in ObjectGui in 2.0 beta yet the principle will remain the same: you have to write custom vertex shader in order to use it with post effects. Have you used my advice I mentioned earlier about that?

 

Also, why don't you want to use ObjectGuiMesh?

hi Bob:

    Could you possible send me the new fixed shader? I tried your idea but not sure where to put the shader. Since the spriteshader widget use post effect , it seems not put the vertex transform into the post effect. On the other side gui_base already have the vertex transform you mentioned which widgetspriteshader should already use that?

    we don't want to use mesh , since objectgui is much easier to resize.

 

thanks

Link to comment
×
×
  • Create New...