VRCBilliards / vrcbce

VRCBilliards: Community Edition
MIT License
307 stars 37 forks source link

akalink table, UI, and shader #122

Closed akalink closed 2 years ago

akalink commented 3 years ago

contribution includes a new pool table, a reorganized menu, and a special color menu and shader to allow players to customize the color of the pool table balls.

new pool table - overall lower poly and with more mirrored textures for less resolution loss when crunched to lower resolution.

new shader - a custom shader that uses masks to remove existing color and overlay a custom color. Includes a float within the shader to transition between using the texture and the color override.

new menu panel - a UI panel with preset colors and HSV sliders. Prefabed so it can be added to any existing menu.

unused UI for a 2 color vs multicolor balls switch. I tried to implement this, but was unsuccessful.

prefabs has been set up to fit the existing prefabs and how their nested prefabs work.

other notes: The code on the pool state manager has been edited to include shader properties and related variables, a bool toggle, and a connection to the behaviors. The code is liberally commented, always started with "akalink added" or "akalink edited". The behavior will leave a message if the system is toggle on without connection to the color panel behaviors (color picker). A work around for a strange audio bug is also included. (I'll cover this later) The code on the FSP Udon Activator has been edited to include support to triggering audio. This is used to add a sound to interactions on the menu. The code on the pool menu has been edited to change various hard coded strings into public strings, this is to allow individual versions of the pool table to have differing text on the respective messages.

Bugs: A bug revolving around the timer option has sprung up. Whenever the timer variable is incremented, or decremented, a version of the menu interact sound with excess reverb will play. It plays on the audio source attached the core table code. A work around has been implemented that turns off the audio source a line before the variable is either incremented or decremented. The audio source is turned back on before the game actually starts.

CLAassistant commented 3 years ago

CLA assistant check
All committers have signed the CLA.

Legoman99573 commented 3 years ago

Nice addition, but you will have to sign the CLA before it can be merged.

Metamaniac commented 3 years ago

Going to leave the same comment here as I made when testing this the other day: this is great and with some small tweaks and oversight between Panda and myself, this will make a fine addition! Me and Panda won't be available to do this for the next 2 weeks at least though, so for now- this comment stands as a "this'll be one of the highlights of the next update" confirmation to anyone observing from the outside

Legoman99573 commented 3 years ago

I do like it myself, but is it possible to add in the UI to disable the Custom Color changes and render just as the regular 8-ball? Would be a nice addition with the new UI for those who want to do the "get real" 8-ball experience while allowing color changing ones.

Will also need to check for quest compatibility with the shader to make sure it doesnt cause frame loss, since I can test with a quest 2 now.

Legoman99573 commented 3 years ago

Tested the color changing shader on quest platform and had no issues besides the normal frame loss when hitting a ball, which is pretty much normal.