Giter Site home page Giter Site logo

linecode / unrealaudiovisual-shaders Goto Github PK

View Code? Open in Web Editor NEW

This project forked from garciaj007/unrealaudiovisual-shaders

0.0 1.0 0.0 49.14 MB

Final project for an Unreal Course for school creating an audio visualizer, manipulating shaders.

C++ 38.33% C 48.40% C# 5.31% HLSL 7.95%

unrealaudiovisual-shaders's Introduction

UnrealAudioVisual-Shaders

Final project for an Unreal Course for school creating an audio visualizer, manipulating shaders.

Things To Add to make stuff work

Make sure to paste this code inside Engine > Shaders > Private > Common.ush file

//Signed Distance Geometry Functions

float SDFSphere(float3 position, float radius)
{
	return length(position) - radius;
}

float SDFBox(float3 position, float3 dimensions)
{
	return length(max(abs(position) - dimensions, 0.0f));
}

float SDFRoundedBox(float3 position, float3 dimensions, float radius)
{
	return length(max(abs(position) - dimensions, 0.0)) - radius;
}

float SDFHexPrism(float3 position, float2 dimensions)
{
	float3 q = abs(position);
	return max(q.z - dimensions.y, max((q.x*0.866025 + q.y*0.5), q.y) - dimensions.x);
}

float SDFTriangularPrism(float3 position, float2 dimensions) {
	float3 q = abs(position);
	return max(q.z - dimensions.y, max(q.x*0.866025 + position.y*0.5, -position.y) - dimensions.x*0.5);
}

float SDFCappedCylinder(float3 position, float2 dimensions)
{
	float2 d = abs(float2(length(position.xz), position.y)) - dimensions;
	return min(max(d.x, d.y), 0.0) + length(max(d, 0.0));
}

//Signed Distance Operations

float SDFUnion(float d1, float d2)
{
	return min(d1, d2);
}

float SDFSubtraction(float d1, float d2)
{
	return max(-d1, d2);
}

float SDFIntersection(float d1, float d2) {
	return max(d1, d2);
}

float3 SDFRepetition(float3 position, float3 spacing)
{
	return fmod(position + 0.5 * spacing, spacing) - 0.5 * spacing;
}

unrealaudiovisual-shaders's People

Contributors

garciaj007 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.