bevy_outline_post_process page

This commit is contained in:
Silas Bartha 2024-08-17 19:34:17 -04:00
parent 73332a62e3
commit 4d1368e382
Signed by: soaos
GPG Key ID: 9BD3DCC0D56A09B2
10 changed files with 67 additions and 2 deletions

View File

@ -15,6 +15,7 @@ author = "Silas Bartha"
taxonomies = [
{ name = "categories", render = false },
{ name = "languages", render = false },
{ name = "projects", render = false },
]
[markdown]

View File

@ -0,0 +1,28 @@
+++
title = "bevy_outline_post_process"
[taxonomies]
categories = ["bevy plugin"]
languages = ["rust", "wgsl"]
[extra]
github = ["exvacuum/bevy_outline_post_process"]
crates = ["bevy_outline_post_process"]
+++
this plugin allows you to add outlines to a camera as a post-processing effect in the bevy engine
![0.1 threshold, 2.0 thickness](threshold_10.png)
the effect makes use of a normal prepass to determine surface normals of objects in view, and then uses the differences between those normal values to determine where outlines should occur
the effect is configurable, you can change the thickness of the outlines and the threshold (how significant the difference between normals need to be for an outline to appear)
![0.1 threshold, 1.0 thickness](threshold_10_thin.png)
![0.1 threshold, 4.0 thickness](threshold_10_thick.png)
there's also an option to enable *adaptive outlines*, so that darker areas get outlined with white and brighter areas are outlined with black
![adaptive](threshold_10_adaptive.png)
i created this effect to improve visual contrast in my [white (I)](@/projects/white_I/index.md) project, which is why i haven't added support for different colors
you're free to add it yourself though, probably wouldn't be too hard

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

View File

@ -0,0 +1,17 @@
+++
title = "white (I)"
description = "an experimental, terminal-based, 3D filesystem adventure"
[taxonomies]
languages = ["rust"]
categories = ["game"]
[extra]
wip = true
+++
i plan on making the source for this game available closer to once it's finished
this is probably the most ambitious undertaking i've ever undertook
<br/>
i'll fill out this page with some screenshots soon, but this project drove the creation of a lot of the bevy plugins i've made

View File

@ -9,8 +9,12 @@ a {
color: everforest.$blue;
}
.wip-indicator {
color: everforest.$yellow;
}
.langcolor {
&-rust {
color: #CE412B;
color: everforest.$orange;
}
}

View File

@ -4,8 +4,13 @@
<a href="{{ get_url(path='@/projects/_index.md') }}"> <- back to projects</a>
<h1 class="title">
{{ page.title }}
{% if page.extra.wip %}
(<span class="wip-indicator">wip</span>)
{% endif %}
</h1>
{% if page.description %}
<p><strong>{{ page.description }}</strong></p>
{% endif %}
{% if page.taxonomies.categories %}
<p>category: {{ page.taxonomies.categories[0] }}</p>
@ -39,4 +44,14 @@
{% endif %}
<br/>
{{ page.content | safe }}
{% set project = get_taxonomy_term(kind="projects", term=page.title, required=false) %}
{% if project and project.page_count > 0 %}
<br/>
<p><strong>related blog posts:</strong></p>
<ul>
{% for page in project.pages %}
<li><a href="{{ page.permalink }}">{{ page.title }}</a> ({{ page.date }})</li>
{% endfor %}
</ul>
{% endif %}
{% endblock content %}

View File

@ -11,7 +11,7 @@
<b>{{category.name}}</b>
<ul>
{% for page in category.pages %}
<li><a href="{{ page.permalink | safe }}">{{ page.title }}: {{ page.description }}</a></li>
<li><a href="{{ page.permalink | safe }}">{{ page.title }}{% if page.description %}: {{ page.description }}{% endif %}</a>{% if page.extra.wip %} (<span class="wip-indicator">wip</span>){% endif %}</li>
{% endfor %}
</ul>
{% endfor %}