Search found 6 matches

by gragor
Wed Jul 10, 2024 11:52 am
Forum: Everything 2d/3d Graphics
Topic: Converting refraction HLSL shader to GLSL
Replies: 5
Views: 820

Re: Converting refraction HLSL shader to GLSL

I got it working.
void main(void)
{
vec4 sPos = WVPMatrix * gl_Vertex;
gl_Position = sPos;

eyeLinear.x = 0.5 * (sPos.w + sPos.x);
eyeLinear.y = 0.5 * (sPos.w + sPos.y);
eyeLinear.z = sPos.w;

texCoord = gl_MultiTexCoord0.xy;
}
by gragor
Wed Jul 10, 2024 11:12 am
Forum: Everything 2d/3d Graphics
Topic: Converting refraction HLSL shader to GLSL
Replies: 5
Views: 820

Re: Converting refraction HLSL shader to GLSL

My vertex shader is slightly different: uniform mat4 WVPMatrix; uniform float refractionDisplacement; uniform float colorStrength; varying vec2 texCoord; varying vec3 eyeLinear; void main(void) { vec4 sPos = WVPMatrix * gl_Vertex; gl_Position = sPos; eyeLinear.x = 0.5 * (sPos.z + sPos.x); eyeLinear....
by gragor
Wed Jul 10, 2024 11:05 am
Forum: Everything 2d/3d Graphics
Topic: Converting refraction HLSL shader to GLSL
Replies: 5
Views: 820

Re: Converting refraction HLSL shader to GLSL

This is what I get, when I render just refraction, with no diffuse texture:

https://i.ibb.co/kXTYgWv/refraction-rendering.png
by gragor
Wed Jul 10, 2024 9:10 am
Forum: Everything 2d/3d Graphics
Topic: Converting refraction HLSL shader to GLSL
Replies: 5
Views: 820

Converting refraction HLSL shader to GLSL

I have perfectly working refraction shader in HLSL: float4x4 WVPMatrix; float refractionDisplacement; float colorStrength; struct VS_OUTPUT { float4 Pos : POSITION; float2 texCoord : TEXCOORD0; float3 eyeLinear : TEXCOORD1; }; VS_OUTPUT vertexMain(float4 Pos : POSITION, float2 texCoord : TEXCOORD0) ...
by gragor
Tue Jul 02, 2024 5:45 pm
Forum: Project Announcements
Topic: Glass Refraction Demo
Replies: 17
Views: 6963

Re: Glass Refraction Demo

Does anyone have on computer source code with shaders for this glass refraction demo?
Original website is down. And Internet Archive webpage does not contain this demo from past
by gragor
Fri Apr 19, 2024 5:59 pm
Forum: Code Snippets
Topic: Old tutorials from http://sio2.g0dsoft.com/
Replies: 1
Views: 817

Old tutorials from http://sio2.g0dsoft.com/

Hi,

has anyone tutorials from http://sio2.g0dsoft.com/ . This page no longer exists.
That were good tutorials, If anyone has them please upload them to some free server.