Skip to content

Commit

Permalink
pictures for README
Browse files Browse the repository at this point in the history
  • Loading branch information
SCRN-VRC committed Mar 4, 2021
1 parent 73a4ab5 commit 64dc462
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
Binary file added Media/ingame1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Media/project.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Voice-Recognition-Shader
Audio detection with visemes example with a robot doggo all done with shaders.
# Voice Recognition Shader
Audio detection with visemes controlling a robot doggo done with shaders.
<img src="Media/project.png"/>
<img src="Media/ingame1.png"/>

## Live Demo

For people that can clone the avatar by ID

https://vrchat.com/home/avatar/avtr_c270cd25-9e71-40cb-916f-6f588519cea4
* https://vrchat.com/home/avatar/avtr_c270cd25-9e71-40cb-916f-6f588519cea4

## Setup
#### Prerequisites
Expand Down
Binary file modified Unity/Assets/VoiceRecognition/Instructions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,19 @@
float3 viewDir = mul((float3x3)unity_ObjectToWorld, UNITY_MATRIX_IT_MV[2].xyz);
float ang = atan2(viewDir.x, viewDir.z) / UNITY_PI * 180.0 + 180;

if (abs(i.uv.y - 0.207) < 0.065)
{
col *= fmod(_Time.y, 0.75) <= 0.375 ? 0.0 : 1.0;
}

if (abs(i.uv.y - 0.76) < 0.03125 && abs(i.uv.x - 0.7266) < 0.03125)
{
i.uv.y = (i.uv.y - 0.732) / 0.0625;
i.uv.x = (i.uv.x - 0.6953) / 0.25 + ang / 360.0;
float4 dirImg = tex2D(_DirTex, i.uv);
col.rgb = dirImg.rgb * dirImg.a;
}

// apply fog
UNITY_APPLY_FOG(i.fogCoord, col);
return col;
Expand Down

0 comments on commit 64dc462

Please sign in to comment.