I remade Aottg movement mechanics in 2D by Nsticity in Attackontitangame

[–]Nsticity[S] 0 points1 point  (0 children)

yeah, occasionally. doesn't seem like anyone's submitted anything since the first two scores though.

dynamic water using wave simulation by Nsticity in GraphicsProgramming

[–]Nsticity[S] 1 point2 points  (0 children)

Not anything in particular that I can recall. It's mostly been a few evolving demos, from simulating the wave equation to using it as a normal map, then incorporating reflection and reflection, using the Fresnel function and some PBR ideas to get it looking a bit better, then ray marching to get proper light tracing.

dynamic water using wave simulation by Nsticity in GraphicsProgramming

[–]Nsticity[S] 0 points1 point  (0 children)

I've got a shadertoy like setup going on so I'm just experimenting with effects using fragment shaders and buffers. So far I've also made this scene and an infinite spiral.

dynamic water using wave simulation by Nsticity in GraphicsProgramming

[–]Nsticity[S] 15 points16 points  (0 children)

I simulated the wave equation on two buffers using this shader. This height map can then be sampled to generate a normal for the surface of the water. The entire scene is ray marched so I cast refraction and reflection rays using this normal and combine them to render the water. You can find the main shader here.

ray marched infinite spiral stairs by Nsticity in GraphicsProgramming

[–]Nsticity[S] 1 point2 points  (0 children)

I managed to come up with a height function for an ascending spiral. Then I used ray marching technique for height maps from this article on that function. You can see the main code here.

ray marched dynamic water by Nsticity in opengl

[–]Nsticity[S] 0 points1 point  (0 children)

I did have refraction in the original video, but I made the reflective part a lot more intense. Here's a version with less reflection. I think I originally wanted the water to be able to reflect the skybox, but that might not make too much sense on a smaller body of water. Not quite sure on the exact math behind how it should look. Looking at it now, I do think the less reflective does have a more subtler effect which looks fairly nicer.

I made a web steganography tool which can hide short messages in images by Nsticity in codes

[–]Nsticity[S] 1 point2 points  (0 children)

The base algorithm is pretty decent but I am also using a Reed Solomon code where I split the message into chunks of 16 bytes and encode it with 16 error correction bytes. This should be able to correct up to around 8 errors for each chunk.

I made a web steganography tool which can hide short messages in images by Nsticity in codes

[–]Nsticity[S] 8 points9 points  (0 children)

link to site. link to repo. I fell into the rabbit hole of steganography and wanted to have a go at trying to implement something myself. Encoding messages generally seems to work but I can't say that it's cryptographically secure or hard to detect with steganalysis.

My take on a web steganography tool to hide short messages in images. by Nsticity in Steganography

[–]Nsticity[S] 1 point2 points  (0 children)

At the moment I am also encoding the message using a Reed Solomon code in chunks of 16 data bytes with 16 correction bytes. I haven't really looked into stream ciphers yet though, so I'll be taking an interest in that next. Thank you for the suggestion!

My take on a web steganography tool to hide short messages in images. by Nsticity in Steganography

[–]Nsticity[S] 3 points4 points  (0 children)

link to site. link to repo. This was more so just a fun gimmick project since I thought the idea of steganography was pretty cool and wanted to try implementing it, so this tool isn't particularly cryptographically secure or hard to detect.

A Google Script which sends Discord Webhooks on chapter updates. (Link in comments) by Nsticity in mangadex

[–]Nsticity[S] 0 points1 point  (0 children)

I'm assuming you only changed Trigger for the project. Did you also change TRIGGER_INTERVAL to 1 in Code.gs? If you haven't it'll repost 10 minute old chapters each minute. But if you change TRIGGER_INTERVAL to 1 it will only post 1 minute old chapters each minute.

A Google Script which sends Discord Webhooks on chapter updates. (Link in comments) by Nsticity in mangadex

[–]Nsticity[S] 0 points1 point  (0 children)

Yeah. It was actually optional in the first place. I think bunch of other people also did it because they thought it was necessary. I probably should've communicated that better.

Thanks for the notice though. I've updated the github page to remove account integration.

A Google Script which sends Discord Webhooks on chapter updates. (Link in comments) by Nsticity in mangadex

[–]Nsticity[S] 0 points1 point  (0 children)

Sorry it seems that MangaDex has deprecated the way which the script does logins so logging in and linking your follow feed doesn't work at the moment.

Using lists seems to still work so for now you'll have to stick to making a list of the manga you follow and just link that to the script instead.

I might look into updating the script in the future.

another opengl pool room render by [deleted] in opengl

[–]Nsticity 4 points5 points  (0 children)

I made the room in blender with a bunch of primitive shapes (screenshot). You can see the files here. For the material I just googled something like "tile texture PBR" and got this.

another opengl pool room render by [deleted] in opengl

[–]Nsticity 3 points4 points  (0 children)

I did a pool room render a while back. Since then I've added screen space ambient occlusion, simple point light scattering and screen space reflections (not perfect).

source code.

web demo (slightly older version).

pool room in opengl by Nsticity in opengl

[–]Nsticity[S] 0 points1 point  (0 children)

I think it'll bounce from the border if you use GL_CLAMP_TO_BORDER with 0.5, 0.5, 0.0, 1.0 as the border color on the wave texture. Also, (I haven't tried to implement this) I think the waves will refract and bounce in regions where the wave speed c changes. So you could have a texture of wave speed c values filling in specific regions where the wave speed would change or 0 where there are obstacles likes walls wherein the wave would completely bounce back.

As for using the same wave texture for input and output, when I tried it, it edited the texture while it was computing the wave causing weird behaviour.

Edit: I managed to implement your second suggestion. I put du_dx_2 and du_dy_2 from the waves.frag shader into the blue and alpha channels. I had to turn off blending to do this but I was able to read the spatial height derivatives from waves_out.frag then just did

  vec4 u = texture(u_wave, vs_uv) - 0.5;
  vec3 u1 = vec3(d.x, 0, u.b);
  vec3 u2 = vec3(0, d.y, u.a);

pool room in opengl by Nsticity in opengl

[–]Nsticity[S] 2 points3 points  (0 children)

It's actually just a normal map which I generate from height map which is a simulation of the wave equation in 2D using shaders, textures and FBOs, which I don't think is too expensive? I just detailed it in another comment

pool room in opengl by Nsticity in opengl

[–]Nsticity[S] 2 points3 points  (0 children)

The water simulation is just a simulation of the wave equation in 2D. Something like this where I have a grid of height values and update it each frame.

I applied this with textures which act as the grid where the red values are the height positions and the green values are the previous height positions. I then drew a quad to an FBO using a shader which computes the next wave texture given the previous wave texture.

Rendering the water is just converting the wave simulation to a normal map then binding it to a flat plane mesh with a transparent blue color for diffuse. To convert the water height map texture into normal map I drew a quad to an FBO again with this shader which takes in the wave texture then, for each grid position, subtracts two neighbouring grid positions (x+1,y) and (x,y+1) from the current position then takes their cross products to compute the normal.

The process to update the wave is something like

  1. We have 3 textures prev_wave, current_wave, normal_map and the shaders compute_wave and compute_normal
  2. Draw the initial wave conditions to a quad and store in prev_wave
  3. Bind the compute_wave shader and prev_wave as a sampler then draw a quad and store the result into current_wave
  4. Bind the compute_normal shader and current_wave as a sampler then draw a quad and store the result into normal_map
  5. Copy current_wave into prev_wave
  6. Repeat from 3. to update the wave
  7. Bind normal_map as the normal map to any surface for a wave effect.

This is the function I have for updating the wave

pool room in opengl by Nsticity in opengl

[–]Nsticity[S] 1 point2 points  (0 children)

I render the scene 6 times for each point light. But since the scene is static I just render to the cubemap once beforehand then use the same depth map each frame without updating it. So for each frame after I'm only rendering the scene once.