However, I am a fan of bright colours, and I like to see some definition in my games, so I thought I'd make some changes. I was inspired by watching a mod of Dark Souls that turned the game's textures into Lisa Frank style paintings using deep learning, I was also inspired by this article I read recently on tone-mapping: https://64.github.io/tonemapping/ Of the effects on there I preferred the Uncharted 2 tone map. I implemented it in Sekiro, but since that image is already clamped between 0 and 1 the results weren't pleasing. So I went back to my old friend, Bézier curves. I might as well post the code at this point.
float3 CalculateBezierPoint(float t, float3 p1, float3 p2)
{
//see: http://devmag.org.za/2011/04/05/bzier-curves-a-tutorial/
// We dont need point 0 or 3 as they are 0,0 and 1,1 respectively.
float u = 1.0f - t;
float tt = t * t;
float uu = u * u;
float uuu = uu * u;
float ttt = tt * t;
float3 p = uuu * float3(0, 0, 1);
p += 3 * uu * t * p1;
p += 3 * tt * u * p2;
p += ttt;
return p;
}
float3 CalculateBezierColour(float3 colour, float3 p1, float3 p2)
{
p1.z = 1.0;
p2.z = 1.0;
// X-axis represents orignal value, y represents transformed.
float r, g, b;
r = CalculateBezierPoint(colour.r, p1, p2).y;
g = CalculateBezierPoint(colour.g, p1, p2).y;
b = CalculateBezierPoint(colour.b, p1, p2).y;
return float3(r, g, b);
}
float3 CustomPass(float4 position : SV_Position, float2 texcoord : TEXCOORD0) : SV_Target
{
float3 colorInput = tex2D(s0, texcoord).rgb;
return CalculateBezierColour(pow(abs(colorInput + 0.05), 1.25), float3(0.75f, 0.25f, 1.0f), float3(0.25f, 0.75f, 1.0f));
}
- Sudoku Solver (in as few lines as possible)
- Pogo Fello is going to take a back seat (or will be scrapped) as it would seem that someone has already made a game very similar to it
- A graphical operating system for the Raspberry Pi Zero W (as the default one is quite slow)
- A rasterizer... I may have to write this for the OS anyway
- Some kind of low-res real-time ray-tracer, likely using OpenCL to generate each frame and OpenGL or Vulkan to render it
- Some kind of AI application (I wasn't happy with the one I made at Uni) possibly a crossword solver
- Something to do with cloth physics (likely with a geometry shader)
- The Discord library for C++
- Something using Physically Based Rendering
- Some kind of database of publicly available information for what ingredients are in various food products (this one's out of left field, I think it should also be built by contributions from users)
- I would like to see what Q# has to offer (a language designed by Microsoft to run as if it were on a quantum computer)
- More research into reflective yet translucent materials... I find it interesting that when you look through a window you can choose to focus on either what's through it, or what's reflected in it.
- A vulkan modelling program (moving vertices around in 3D to build objects)
- I also have something in my projects folder called "Disco Ball", I think it would use some quick and dirty ray-tracing.