summaryrefslogtreecommitdiffstats
path: root/Shaders
Commit message (Collapse)AuthorAge
* Custom chatbox shader writes depthyum2023-03-23
| | | | | | | | This fixes issues where the transparent corners of the textbox render in front of other materials, causing those other materials to skip rendering. * Update README.md with roadmap and avatar resource usage.
* Reduce texture memory usage for English speakersv0.10.0yum2023-03-21
| | | | | | | | | | We used to populate 7 4k textures + 1 2k texture for all users. Now if the user has configured `bytes_per_char=1` in the Unity panel, we just populate a single 512x512 texture containing the first 128 ASCII characters. This reduces texture memory usage by 99.74%, from 134.67 MB to 340 KB.
* Update .gitignore filesyum2023-02-13
|
* Add hack to reduce outlines around emotesyum2023-02-13
| | | | | | | | Don't render any part of an emote with alpha < 0.5. Improves visual clarity in the common case at the cost of generality. * Emotes now use physically-based shading. * Use round() to denoise shader parameters instead of floor()
* Finish emotesyum2023-02-13
| | | | | | | | | | | Emotes require 2 bytes per char. They're encoded into the region [0xE000, infinity). The texture is 4k, and uses 1k vertical pixels per emote segment, for a maximum of 32 segments. * Reduce volume of noise indicator by 90%. Quiet is probably better. Might want to add a volume slider idk. * Bugfix: emotes without a transparency channel now work * Address a couple Unity performance complaints about the shader
* Begin work adding emotesyum2023-02-13
| | | | | | | | | | | | Done: * Users can add images to Fonts/Emotes/ * The basename of that image ('clueless.png' becomes 'clueless') is the keyword to make the image show up in game. * Fix a bug in the shader where letters on the 2nd texture and later would have UV outside of [0.0, 1.0] Not yet implemented: * transcribed words are encoded using emotes mapping
* Shader now supports custom cubemapyum2023-02-06
| | | | Applied to both PBS and TaSTT shaders.
* Do not use PBR shading on curve transparencyyum2023-01-31
| | | | Diffuse reflections can show up on this part.
* Implement simple anti-aliasingyum2023-01-31
| | | | | | | Sample the texture up to 5 times using the algorithm shown in `aa_sample_algorithm.py`. Results are averaged together. * Redo dithering PRNG
* Rework ditheringyum2023-01-31
| | | | | | | | | I realized that ddx(i.uv.x) tells us how wide the current pixel is w/r/t UV coordinates. We can use this to implement a better form of dithering, which gets weaker as the viewer gets closer and stronger as they get farther. * Fine-tune mip map filtering based on play testing
* Check in PBS, a very minimal physically-based shaderyum2023-01-29
| | | | | Strip out everything except the PBS bits from the TaSTT shader and put them into a standalone shader.
* Bugfixesv0.4.0yum2023-01-27
| | | | | | * Fix prefab: bounding box & position are now set to 0 * Fix shader: text is no longer upside down * Update README
* Enable texture-based PBR rendering of backplateyum2023-01-27
| | | | | | Users can now use PBR textures on their custom backplate! * Update TaSTT.fbx: UV map aspect ratio matches board
* Fix PBR metallicsyum2023-01-26
| | | | | | | Metallics now reflect the map's cubemap. * Remove SpecularTint (did nothing) * Adjust mipBias to be sharper
* Correct ddx/ddy calculationyum2023-01-26
| | | | | | | | | Need to calculate this in the space of letter UVs, not the overall text box UV space, in order for the correct mip maps to be chosen. * Expose dithering as a toggle in the shader * Actually generate mipmaps * Fine-tune mipmapBias for legibility
* Improve font renderingyum2023-01-26
| | | | | | * Enable streaming mipmaps on glyph bitmaps * Sample glyph bitmaps using mipmaps * Add temporal noise to letter UVs (dithering)
* Update Unity materialsyum2023-01-25
| | | | | | * Render at 3k render queue to avoid clashing with avatar meshes * Set reasonable shader defaults * Remove unused material
* Finish basic PBR shadingyum2023-01-25
| | | | | | | | | | | | | TaSTT shader now uses physically based rendering (PBR). Users can pick smoothness, metallic, and emissive. This implementation borrows heavily from catlikecoding.com's excellent tutorials, which are released under MIT No Attribution (MIT-0). https://catlikecoding.com/unity/tutorials/license/ To retain what little clarity remains in the shader, I have chosen not to attribute the code in the source itself.
* Begin work on PBR shaderyum2023-01-25
| | | | | | | | Light color themes revealed a need for a lit shader, since an unlit shader would be blindingly bright. This implementation doesn't really work in game. I suspect that I need to support more than just one global light.
* Enable more shader customizationyum2023-01-23
| | | | | | | | * Text color, background color, and margin color are all customizable now * Better organize shader parameters. User-facing params are exposed Like_This; internal params are exposed _Like_This. * Update README. More wordsmithing.
* package.ps1 now fetches all dependenciesyum2023-01-23
| | | | | | | Don't literally check in Python since it looks dodgy (rightfully so). Instead the build script just fetches it. * Update README, simplifying language and documenting other projects
* Bugfix: user-provided paths may now contain spacesyum2023-01-04
| | | | | | | | | | | | | | | | Previously, paths containing spaces would be interpreted by python's argument parser as multiple separate arguments, causing it to fail. Now we escape paths inside PythonWrapper using std::quoted(). * Improve PII filtering. Python output would contain multiple path separators (like C:\\Users\\foo\\), defeating the PII regex. * Silence compiler warning in PII filter. * Document usability improvements. * Transcription layer exponential backoff goes to ~infinity when paused. This is a hack, since we really don't need to transcribe at all when paused, but it lets us keep the code simple. Good enough until the next rewrite. * Shader only samples background when necessary. * Limit matchStrings() print()s to DEBUG mode
* GUI: Users can now control board dimensionsyum2022-12-29
| | | | | | | | Users can now control how many letters wide and tall the board is. Tested at 4x48, 5x60, 10x120, and 20x240. At 20x240, Unity freezes and does not make forward progress. Perhaps creating 4800 float parameters isn't a truly scalable interface.
* Add Scripts/generate_shader.pyyum2022-12-29
| | | | | | | | | | | | | | Now it's possible to generate shaders with a custom number of rows, columns, and bytes per character. All edits to the shader should go through TaSTT_template.shader. To generate a new shader from the template: $ ./Scripts/generate_shader.py \ --bytes_per_char 2 \ --rows 1 \ --cols 12 --shader_template $(pwd)/Shaders/TaSTT_template.shader \ --shader_path $(pwd)/Shaders/TaSTT.shader
* Touch up TaSTT.shaderyum2022-12-25
| | | | | | | Add a new shader to make the box a little prettier. * Reduce material slots required from 2 to 1 * Add rounding to edge of box
* Add shader togglesyum2022-12-21
| | | | | | * Fix shader background rendering * Add ability to control margin size * Add ability to disable speech indicator
* Check in `World Constraint.prefab`yum2022-12-20
| | | | Can simply drag this into hierarchy & update reset target.
* Add emotesyum2022-11-26
| | | | | | | | | | | | | | | | | | | | Add emotes.py. It accepts a list of images and creates a texture with 64 total embedded images. The shader knows how to draw these into fixed 6-character-wide slots. Each slot must be aligned to a 6-character boundary. osc_ctrl has to pad with spaces to make this work. This whole patch is a little more complicated than it has any right to be, but my brain feels fuzzy and I don't know where to start fixing it, so I'm going to leave it shitty-but-functional for now. There's also some bug where writing a character into the 11th slot causes it to show up at the end of the board. I'll figure that out later, idk. I didn't include any of the emotes I use since I couldn't find any info on their licenses. I'm just banking on having a good workflow later on so people can add their own.
* Code cleanupyum2022-11-25
Reorganize locations, remove a couple unused parameters.