First of all, this document is just a recompilation of different resources that already existed on the web previously that I personally tested some ones did work and other not. I liked the idea to make a full guide from start to end so all of you could also enjoy playing with cool-retro-term on windows 10. Personally I installed it on a windows 10 pro version. Fingers crossed!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#ifndef INC_ENTITY_MSGS_ | |
#define INC_ENTITY_MSGS_ | |
/* | |
A super basic event system based on LEvent implementation from @jagenjo. | |
Some improvements should be done: | |
* swap to numerical ids instead of strings: https://github.com/mariusbancila/stduuid | |
* add sorting method to controll the call order on trigger | |
This is a little example to test it works: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
None of this code has been made by me and just collected those snippets from many sources | |
across the internet. I haven't saved any of the original author names and all the credits | |
should go to them. | |
HPlass ([email protected]) - 2020 | |
*/ | |
/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
All components are in the range [0...1], including hue. | |
Source: http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl | |
*/ | |
vec3 rgb2hsv(vec3 c) | |
{ | |
vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); | |
vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g)); | |
vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
C/C++ reimplementation of the code. | |
Read: https://www.forrestthewoods.com/blog/solving_ballistic_trajectories/ | |
Source: https://github.com/forrestthewoods/lib_fts/blob/master/code/fts_ballistic_trajectory.cs | |
Dependencies: https://github.com/Microsoft/DirectXTK/wiki/SimpleMath | |
HPlass ([email protected]) - 2020 | |
*/ | |
bool solve_ballistic_arc_lateral(const VEC3 proj_pos, const float lateral_speed, const VEC3 target_pos, const float max_height, VEC3& fire_velocity, float& gravity) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Most of this code hasn't been made by me (maybe partially tweaked to fit) and just collected those snippets from many sources | |
across the internet. I haven't saved some of the original author names and all the credits | |
should go to them. I'm pretty some of you may find optimizations to them, feel free to leave a comment. | |
HPlass ([email protected]) - 2020 | |
*/ | |
/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float2 hammersley(uint index) { | |
// Compute Hammersley sequence | |
// TODO: these should come from uniforms | |
// TODO: we should do this with logical bit operations | |
const uint numSamples = uint(IBL_INTEGRATION_IMPORTANCE_SAMPLING_COUNT); | |
const uint numSampleBits = uint(log2(float(numSamples))); | |
const float invNumSamples = 1.0 / float(numSamples); | |
uint i = uint(index); | |
uint t = i; | |
uint bits = 0u; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vec4 matcap(sampler2D sampler, mat4 view_matrix, vec3 normal, float scale){ | |
vec3 vN = (view_matrix * vec4(normal, 0.)).xyz; | |
float2 uvs = view_N.xy * vec2(1.,-1.) * 0.48 * scale + vec2(.5, .5); | |
return texture2D(sampler, uvs); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Most of this code hasn't been made by me (maybe partially tweaked to fit) and just collected those snippets from many sources | |
across the internet. I haven't saved some of the original author names and all the credits | |
should go to them. I'm pretty some of you may find optimizations to them, feel free to leave a comment. | |
HPlass ([email protected]) - 2020 | |
Source: | |
https://thebookofshaders.com/11/ | |
https://thebookofshaders.com/edit.php#11/lava-lamp.frag |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This is a set of easing functions I used for VFX, should work in HLSL, GLSL and C/C++, if not leave a comment. | |
Most of this code hasn't been made by me (maybe partially tweaked to fit) and just collected those snippets from many sources | |
across the internet. I haven't saved some of the original author names and all the credits | |
should go to them. I'm pretty some of you may find optimizations to them, feel free to leave a comment. | |
HPlass ([email protected]) - 2020 | |
*/ |
OlderNewer