Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to create an outline shader? #18

Open
hammouda101010 opened this issue Sep 17, 2024 · 7 comments
Open

how to create an outline shader? #18

hammouda101010 opened this issue Sep 17, 2024 · 7 comments

Comments

@hammouda101010
Copy link

how to create an outline shader?

@David-Orangemoon
Copy link
Collaborator

Depends on where you want the outlines really. Outline shaders come in many varieties.

@hammouda101010
Copy link
Author

a toon shader, like this:

classic-sphere

@David-Orangemoon
Copy link
Collaborator

Here is a simple 2d one

uniform highp vec3 outline_c;
uniform highp float progress;

void fragment() {
  fragColor = mix(fragColor, vec4(outline_c,fragColor.a), progress - fragColor.a * progress);
}

Here is a simple glsl implementation of an outline.

@hammouda101010
Copy link
Author

but like, how to do it with the Pen+ Shader Editor?

@hammouda101010
Copy link
Author

hello, hello?

@AlexSchoolOH
Copy link
Collaborator

I've been trying to make one for shaded. but I don't know which context you will use this outline in.

@hammouda101010
Copy link
Author

like in a 2D game

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants