Skip to content

Commit

Permalink
Added copyrights c/o code-cite.
Browse files Browse the repository at this point in the history
  • Loading branch information
shanecelis committed Dec 29, 2018
1 parent 9a53906 commit d0cf7d8
Show file tree
Hide file tree
Showing 13 changed files with 186 additions and 11 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
Water Demo
==========

![Water demo GIF showing caustics.](water-demo.gif)

This is a port of Evan Wallace's [Water Demo](http://madebyevan.com/webgl-water/) from WebGL to Unity.

Motivation
----------

I ported this as an exercise to investigate different caustics implementations. Having surveyed research papers on real-time caustics, I believe Evan's work supercedes many published algorithms in terms of simplicity and performance and is suitable for publication.
I ported this as an exercise to investigate different real-time caustics implementations. I've only surveyed a handful of research papers on real-time caustics, but it seems like [Evan's work](https://medium.com/@evanwallace/rendering-realtime-caustics-in-webgl-2a99a29a0b2c) would be suitable for publication for both its simplicity and performance.

Requirements
------------
Expand All @@ -29,7 +31,13 @@ A lot of this is smoke and mirrors. The cube knows where the sphere is, so it re
Bugs
----

See the `todo.org` file.
* WebGL build not working (major regression from original project).

* Not all UI from original are preserved.

* Underside of water does not reflect like it should. Seems like a HLSL lerp problem.

See the `todo.org` file for more details.

License
-------
Expand Down
9 changes: 8 additions & 1 deletion Scripts/CameraOrbit.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
//$ cite -u https://github.com/shanecelis/water-demo -C -l mit
//$ cite -u https://github.com/shanecelis/water-demo -C -l mit
/* Original code[1] Copyright (c) 2018 Shane Celis[2]
Licensed under the MIT License[3]
[1]: https://github.com/shanecelis/water-demo
[2]: https://github.com/shanecelis
[3]: https://opensource.org/licenses/MIT
*/

using System.Collections;
using System.Collections.Generic;
Expand Down
9 changes: 8 additions & 1 deletion Scripts/GeometryBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
//$ cite -u https://github.com/shanecelis/water-demo -C -l mit
//$ cite -u https://github.com/shanecelis/water-demo -C -l mit
/* Original code[1] Copyright (c) 2018 Shane Celis[2]
Licensed under the MIT License[3]
[1]: https://github.com/shanecelis/water-demo
[2]: https://github.com/shanecelis
[3]: https://opensource.org/licenses/MIT
*/

// #define HAS_PROCEDURAL_TOOLKIT
using System.Collections;
Expand Down
9 changes: 8 additions & 1 deletion Scripts/MaterialUpdater.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
//$ cite -u https://github.com/shanecelis/water-demo -C -l mit
//$ cite -u https://github.com/shanecelis/water-demo -C -l mit
/* Original code[1] Copyright (c) 2018 Shane Celis[2]
Licensed under the MIT License[3]
[1]: https://github.com/shanecelis/water-demo
[2]: https://github.com/shanecelis
[3]: https://opensource.org/licenses/MIT
*/

using System.Collections;
using System.Collections.Generic;
Expand Down
9 changes: 8 additions & 1 deletion Scripts/WaterSimulation.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
//$ cite -u https://github.com/shanecelis/water-demo -C -l mit
//$ cite -u https://github.com/shanecelis/water-demo -C -l mit
/* Original code[1] Copyright (c) 2018 Shane Celis[2]
Licensed under the MIT License[3]
[1]: https://github.com/shanecelis/water-demo
[2]: https://github.com/shanecelis
[3]: https://opensource.org/licenses/MIT
*/

using System.Collections;
using System.Collections.Generic;
Expand Down
9 changes: 9 additions & 0 deletions Shaders/Caustics.shader
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
//$ cite -u https://github.com/evanw/webgl-water -U https://github.com/shanecelis/water-demo -mC -l mit
/* Original code[1] Copyright (c) 2015 Evan Wallace[2]
Modified code[3] Copyright (c) 2018 Shane Celis[4]
Licensed under the MIT License[5]

[1]: https://github.com/evanw/webgl-water
[2]: https://github.com/evanw
[3]: https://github.com/shanecelis/water-demo
[4]: http://twitter.com/shanecelis
[5]: https://opensource.org/licenses/MIT
*/
Shader "Unlit/Caustics"
{
Properties
Expand Down
11 changes: 10 additions & 1 deletion Shaders/Cube.shader
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
//$ cite -u https://github.com/evanw/webgl-water -U https://github.com/shanecelis/water-demo -mC -l mit
//$ cite -u https://github.com/evanw/webgl-water -U https://github.com/shanecelis/water-demo -mC -l mit
/* Original code[1] Copyright (c) 2015 Evan Wallace[2]
Modified code[3] Copyright (c) 2018 Shane Celis[4]
Licensed under the MIT License[5]

[1]: https://github.com/evanw/webgl-water
[2]: https://github.com/evanw
[3]: https://github.com/shanecelis/water-demo
[4]: http://twitter.com/shanecelis
[5]: https://opensource.org/licenses/MIT
*/
Shader "Unlit/Cube"
{
Properties
Expand Down
11 changes: 10 additions & 1 deletion Shaders/Sphere.shader
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
//$ cite -u https://github.com/evanw/webgl-water -U https://github.com/shanecelis/water-demo -mC -l mit
//$ cite -u https://github.com/evanw/webgl-water -U https://github.com/shanecelis/water-demo -mC -l mit
/* Original code[1] Copyright (c) 2015 Evan Wallace[2]
Modified code[3] Copyright (c) 2018 Shane Celis[4]
Licensed under the MIT License[5]

[1]: https://github.com/evanw/webgl-water
[2]: https://github.com/evanw
[3]: https://github.com/shanecelis/water-demo
[4]: http://twitter.com/shanecelis
[5]: https://opensource.org/licenses/MIT
*/
Shader "Unlit/Sphere"
{
Properties
Expand Down
8 changes: 7 additions & 1 deletion Shaders/TextureView.shader
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
//$ cite -u https://github.com/shanecelis/water-demo -C -l mit
//$ cite -u https://github.com/shanecelis/water-demo -C -l mit
/* Original code[1] Copyright (c) 2018 Shane Celis[2]
Licensed under the MIT License[3]

[1]: https://github.com/shanecelis/water-demo
[2]: https://github.com/shanecelis
[3]: https://opensource.org/licenses/MIT
*/
/**
Shader to view the render textures like water and caustics.
*/
Expand Down
11 changes: 10 additions & 1 deletion Shaders/Water.shader
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
//$ cite -u https://github.com/evanw/webgl-water -U https://github.com/shanecelis/water-demo -mC -l mit

/* Original code[1] Copyright (c) 2015 Evan Wallace[2]
Modified code[3] Copyright (c) 2018 Shane Celis[4]
Licensed under the MIT License[5]

[1]: https://github.com/evanw/webgl-water
[2]: https://github.com/evanw
[3]: https://github.com/shanecelis/water-demo
[4]: http://twitter.com/shanecelis
[5]: https://opensource.org/licenses/MIT
*/
Shader "Unlit/Water"
{
Properties
Expand Down
11 changes: 10 additions & 1 deletion Shaders/WaterIntegrate.shader
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
//$ cite -u https://github.com/evanw/webgl-water -U https://github.com/shanecelis/water-demo -mC -l mit

/* Original code[1] Copyright (c) 2015 Evan Wallace[2]
Modified code[3] Copyright (c) 2018 Shane Celis[4]
Licensed under the MIT License[5]

[1]: https://github.com/evanw/webgl-water
[2]: https://github.com/evanw
[3]: https://github.com/shanecelis/water-demo
[4]: http://twitter.com/shanecelis
[5]: https://opensource.org/licenses/MIT
*/
Shader "CustomRenderTexture/WaterIntegrate"
{
Properties
Expand Down
Binary file added water-demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
88 changes: 88 additions & 0 deletions water-demo.gif.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d0cf7d8

Please sign in to comment.