Jump to content

[SOLVED] trying to use WidgetSpriteShader in a ObjectGui


photo

Recommended Posts

Posted

hi: i 'm trying to use WidgetSpriteShader inside a ObjectGui. Could you send me a sample which is working?

i couldn't make it work.

 

Posted

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

Posted

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

  • 2 weeks later...
Posted

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.

  • 2 weeks later...
Posted

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

Posted

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?

Posted

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

Posted

s_gui_texcoord[] will be replaced by default s_transform[] parameter.

post_blur_* materials will work inside ObjectGui out of the box.

You should wait for the SDK update.

×
×
  • Create New...