Jump to content

Outline glow with transparent mesh


Hersir
 Share

Recommended Posts

Hi,

I tried to make glow outline for plane , similar to HighlightLayer but I have texture that have transparent pixels so HighlightLayer wound work.

Tried to make shader that draws outline, was ok with rectangle but have 1 texture that is not rectangle. Anyone have some suggestions how to draw glow outline around texture?

As i found most of solutions have multi pass  render.

Thanks

Link to comment
Share on other sites

Most of the techniques I used rely on depth or stencil and we usually disable depth testing for transparency.

Having said that if the transparency writes to depth (basically it becomes only a sorting issue) what we are doing today could work with minor updates to the effect layer.

Basically we could add support for transparent meshes as long as they are writing to the depth and stencil buffer so as long as there is no overlap this would potentially work.

Not sure I am clear enough though ?

 

Link to comment
Share on other sites

@Sebavan ok found workaround for this, as my meshes are planes only, I created solution based on texture map, basically I created texture that encodes alphas for glow and background in colour channels, than read data from there and color it in shader.

Works well for plane based meshes as they are really 2d.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...