Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Emissive material?

A topic by noise_source created Feb 05, 2022 Views: 270 Replies: 6
Viewing posts 1 to 5

Is it possible to use an emissive material with the text shader?

Developer

I believe the default shader already uses emissive to achieve the unlit effect! If you mean that you want text actually emits light that's reflected on the environment (global illumination?)... I'm sure it's possible with a shader, but I've never looked into that type of shader, so I'm not sure where to begin just yet. I just want to clarify we're on the same page before I start editing the shader!

(13 edits)

yes I am referring to the emissive property in the standard shader. :) it’s super quick and efficient to do things like add a lit backdrop to text without a performance hit in runtime. Really good for mobile because it works only for static geometry (baked lights) and isn’t dynamic.

https://docs.unity3d.com/Manual/lighting-emissive-materials.html

However, Bloom post processing does still take it into account for screen glow in a dynamic / non baked context. Also, even though it isn’t a dynamic effect, I can fake dynamic things with it using a lightmap switcher :) 

it’s really helpful to make emissive in the shape of text, for glowing outines or for backdrop, that way I don’t have to render it into an image for standard shader

also, the “basic” glow effect it allows even without baking is nice.

Im already doing this with modular 3D text and it looks good! but I like to use both that and this :) 

not 100% sure but it seems like it just needs an emission channel, Amplify has an emission channel output if that helps? 

Developer

Oh, I misremembered... a long time ago STM used to use a surface shader instead of a vertex/fragment shader to render, and *that* used emission. (frag/vert just renders the colour directly)

I attempted to rewrite that, so please give this a shot: https://pastebin.com/Dy04z8F5


Let me know how this goes! The shader is pretty simple, so it might not do what you want, just yet.

Hello Kai,

I'm trying to use this shader as well, but I keep getting the horrible magenta "missing" color on my text instead.

I was wondering if this only works on the default render pipeline, or if it might be a different issue you might have come across?

Developer (1 edit)

Yes, that shader is just for the default render pipeline. (Unity's surface shaders don't work in URP/HDRP, and that's a surface shader I made in the previous post) Super Text Mesh's shaders only fully work properly with the default render pipeline (but I'm currently working with a friend to get a proper URP/HDRP shader made...)