hoodedice wrote:For me, I get it all red. (Using sfan's build posted above.) Windows x86 XP with intel GMA
Don't use DirectX
hoodedice wrote:For me, I get it all red. (Using sfan's build posted above.) Windows x86 XP with intel GMA
RealBadAngel wrote:Vanessa's issue with water is definitely caused by Irrlicht 1.8
Current tree (i made many updates yesterday) is working under 1.7.3
RealBadAngel wrote:Inocudom wrote:tinoesroho wrote:... DirectX is on, innit?
There aren't any Direct X shaders currently.
First lets have OpenGL up n runnin.
Vanessa's issue with water is definitely caused by Irrlicht 1.8
Current tree (i made many updates yesterday) is working under 1.7.3
PilzAdam wrote:RealBadAngel wrote:Vanessa's issue with water is definitely caused by Irrlicht 1.8
Current tree (i made many updates yesterday) is working under 1.7.3
Actually thats wrong, I use Irrlicht 1.7.3 and all water is grey. It also says something about "reflection.png missing" (or similiar).
RealBadAngel wrote:PilzAdam wrote:RealBadAngel wrote:Vanessa's issue with water is definitely caused by Irrlicht 1.8
Current tree (i made many updates yesterday) is working under 1.7.3
Actually thats wrong, I use Irrlicht 1.7.3 and all water is grey. It also says something about "reflection.png missing" (or similiar).
Please do build it again and see first post about settings.
/home/adam/Minetest/minetest_rba_shaders/src/mapblock_mesh.cpp:1204:95: error: no matching function for call to 'ITextureSource::getTexture(<unresolved overloaded function type>)'diff --git a/src/mapblock_mesh.cpp b/src/mapblock_mesh.cpp
index f56a986..b907b64 100644
--- a/src/mapblock_mesh.cpp
+++ b/src/mapblock_mesh.cpp
@@ -1201,7 +1201,7 @@ MapBlockMesh::MapBlockMesh(MeshMakeData *data):
if (enable_shaders) {
ITextureSource *tsrc = data->m_gamedef->tsrc();
material.setTexture(2, tsrc->getTexture("disable_img.png"));
- material.setTexture(3, tsrc->getTexture(getTexturePath("water_surface_normalmap.png").c_str));
+ material.setTexture(3, tsrc->getTexture(getTexturePath("water_surface_normalmap.png").c_str()));
if (enable_bumpmapping) {
std::string fname_base = tsrc->getTextureName(p.tile.texture_id);
std::string normal_ext = "_normal.png";diff --git a/src/mapblock_mesh.cpp b/src/mapblock_mesh.cpp
index f56a986..b907b64 100644
--- a/src/mapblock_mesh.cpp
+++ b/src/mapblock_mesh.cpp
@@ -1201,7 +1201,7 @@ MapBlockMesh::MapBlockMesh(MeshMakeData *data):
if (enable_shaders) {
ITextureSource *tsrc = data->m_gamedef->tsrc();
material.setTexture(2, tsrc->getTexture("disable_img.png"));
- material.setTexture(3, tsrc->getTexture(getTexturePath("water_surface_normalmap.png").c_str));
+ material.setTexture(3, tsrc->getTexture("water_surface_normalmap.png"));
if (enable_bumpmapping) {
std::string fname_base = tsrc->getTextureName(p.tile.texture_id);
std::string normal_ext = "_normal.png";diff --git a/client/shaders/liquids_shader/opengl_vertex.glsl b/client/shaders/liquids_shader/opengl_vertex.glsl
index 08c98cf..9ad16c8 100644
--- a/client/shaders/liquids_shader/opengl_vertex.glsl
+++ b/client/shaders/liquids_shader/opengl_vertex.glsl
@@ -4,6 +4,7 @@ uniform mat4 mInvWorld;
uniform mat4 mTransWorld;
uniform float dayNightRatio;
uniform vec3 eyePosition;
+uniform float time;^M
varying vec3 vPosition;
varying vec3 viewVec;
@@ -14,9 +15,24 @@ varying vec3 viewPos;
varying vec3 cameraPos;
varying vec2 uv;
+float rand(vec2 co)^M
+{^M
+ return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);^M
+}^M
+^M
void main(void)
{
- gl_Position = mWorldViewProj * gl_Vertex;
+ int wavelength = 20;^M
+ float waveheight = 1.7;^M
+ int wavespeed = 100;^M
+ int height_randomness = 1;^M
+ ^M
+ vec4 pos2 = gl_Vertex;^M
+ pos2.y -= 3.0;^M
+ pos2.y -= sin (pos2.z/wavelength + time * wavespeed * wavelength) * waveheight^M
+ + sin ((pos2.z/wavelength + time * wavespeed * wavelength)/7) * waveheight * height_randomness;^M
+ ^M
+ gl_Position = mWorldViewProj * pos2;^M
vPosition = (mWorldViewProj * gl_Vertex).xyz;
vec3 pos = vec3(gl_Vertex);
diff --git a/src/game.cpp b/src/game.cpp
index 4c5e285..580ba8d 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -839,6 +839,8 @@ public:
services->setPixelShaderConstant("useNormalmap" , (irr::s32*)&layer2, 1);
services->setPixelShaderConstant("normalSampler" , (irr::s32*)&layer3, 1);
#endif
+ float timeofday = m_client->getEnv().getTimeOfDayF();
+ services->setPixelShaderConstant("time", &timeofday, 1);
}
};
diff --git a/src/mapblock_mesh.cpp b/src/mapblock_mesh.cpp
index f56a986..fa6cf6a 100644
--- a/src/mapblock_mesh.cpp
+++ b/src/mapblock_mesh.cpp
@@ -1201,7 +1201,7 @@ MapBlockMesh::MapBlockMesh(MeshMakeData *data):
if (enable_shaders) {
ITextureSource *tsrc = data->m_gamedef->tsrc();
material.setTexture(2, tsrc->getTexture("disable_img.png"));
- material.setTexture(3, tsrc->getTexture(getTexturePath("water_surface_normalmap.png").c_str));
+ material.setTexture(3, tsrc->getTexture("water_surface_normalmap.png"));
if (enable_bumpmapping) {
std::string fname_base = tsrc->getTextureName(p.tile.texture_id);
std::string normal_ext = "_normal.png";PilzAdam wrote:Here is another patch that adds Jeijas waves to it (it contains the previous fixes so it should work if you apply it to 1c03fb5efb5095f177c27497200db27694baeea1):Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
diff --git a/client/shaders/liquids_shader/opengl_vertex.glsl b/client/shaders/liquids_shader/opengl_vertex.glsl
index 08c98cf..9ad16c8 100644
--- a/client/shaders/liquids_shader/opengl_vertex.glsl
+++ b/client/shaders/liquids_shader/opengl_vertex.glsl
@@ -4,6 +4,7 @@ uniform mat4 mInvWorld;
uniform mat4 mTransWorld;
uniform float dayNightRatio;
uniform vec3 eyePosition;
+uniform float time;^M
varying vec3 vPosition;
varying vec3 viewVec;
@@ -14,9 +15,24 @@ varying vec3 viewPos;
varying vec3 cameraPos;
varying vec2 uv;
+float rand(vec2 co)^M
+{^M
+ return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);^M
+}^M
+^M
void main(void)
{
- gl_Position = mWorldViewProj * gl_Vertex;
+ int wavelength = 20;^M
+ float waveheight = 1.7;^M
+ int wavespeed = 100;^M
+ int height_randomness = 1;^M
+ ^M
+ vec4 pos2 = gl_Vertex;^M
+ pos2.y -= 3.0;^M
+ pos2.y -= sin (pos2.z/wavelength + time * wavespeed * wavelength) * waveheight^M
+ + sin ((pos2.z/wavelength + time * wavespeed * wavelength)/7) * waveheight * height_randomness;^M
+ ^M
+ gl_Position = mWorldViewProj * pos2;^M
vPosition = (mWorldViewProj * gl_Vertex).xyz;
vec3 pos = vec3(gl_Vertex);
diff --git a/src/game.cpp b/src/game.cpp
index 4c5e285..580ba8d 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -839,6 +839,8 @@ public:
services->setPixelShaderConstant("useNormalmap" , (irr::s32*)&layer2, 1);
services->setPixelShaderConstant("normalSampler" , (irr::s32*)&layer3, 1);
#endif
+ float timeofday = m_client->getEnv().getTimeOfDayF();
+ services->setPixelShaderConstant("time", &timeofday, 1);
}
};
diff --git a/src/mapblock_mesh.cpp b/src/mapblock_mesh.cpp
index f56a986..fa6cf6a 100644
--- a/src/mapblock_mesh.cpp
+++ b/src/mapblock_mesh.cpp
@@ -1201,7 +1201,7 @@ MapBlockMesh::MapBlockMesh(MeshMakeData *data):
if (enable_shaders) {
ITextureSource *tsrc = data->m_gamedef->tsrc();
material.setTexture(2, tsrc->getTexture("disable_img.png"));
- material.setTexture(3, tsrc->getTexture(getTexturePath("water_surface_normalmap.png").c_str));
+ material.setTexture(3, tsrc->getTexture("water_surface_normalmap.png"));
if (enable_bumpmapping) {
std::string fname_base = tsrc->getTextureName(p.tile.texture_id);
std::string normal_ext = "_normal.png";
RealBadAngel wrote:I have updated first post with all the aviable config settings.
Issue with parallax not working perfectly is that we dont have properly calculated tangent.
I do have the code to calculate it in the engine, but theres no way to pass it to shaders.
Theres no way in irrlicht to use GLSL shaders attribute or to pass uniform sampler buffers.
tkerwel wrote:i use minetest-0.4.7-54c8bdb-shaders-win32 and always get the error:
10:46:56: ERROR[main]: generate_shader(): failed to generate "liquids_shader", addHighLevelShaderMaterial failed.
can still play but the water looks strange. its like looking thru dark glass dosent matter if i play this on my laptop or my highend gaming pc.
settings are:
enable_water_wave = true
water_wave_height = 0.4
water_wave_speed = 50
water_wave_length = 20
enable_bumpmapping = true
parallax_mapping_mode = 2
parallax_mapping_scale = 0.08
parallax_mapping_bias = 0.04
sfan5 wrote:It would be nice if you could fix these errors:
http://pastebin.com/WE4H6FGi
RealBadAngel wrote:Those are not errors but your OpenGL
RealBadAngel wrote:Whats your OpenGL version?
$ glxinfo | grep version
server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
OpenGL core profile version string: 3.1 (Core Profile) Mesa 9.2.1
OpenGL core profile shading language version string: 1.40
OpenGL version string: 3.0 Mesa 9.2.1
OpenGL shading language version string: 1.30
Jordach wrote:You will not be able to run shaders whatsoever.hoodedice wrote: intel GMA
Sorry bud.
sfan5 wrote:hoodedice wrote:For me, I get it all red. (Using sfan's build posted above.) Windows x86 XP with intel GMA
Don't use DirectX
[The extension avi has been deactivated and can no longer be displayed.]
Irrlicht Engine version 1.8.0
Microsoft Windows 7 Home Premium Edition Service Pack 1 (Build 7601)
Using renderer: OpenGL 4.2.11631
AMD Radeon HD 6500M/5600/5700 Series: ATI Technologies Inc.
OpenGL driver version is 1.2 or better.
GLSL version: 4.2RealBadAngel wrote:tkerwel wrote:i use minetest-0.4.7-54c8bdb-shaders-win32 and always get the error:
10:46:56: ERROR[main]: generate_shader(): failed to generate "liquids_shader", addHighLevelShaderMaterial failed.
can still play but the water looks strange. its like looking thru dark glass dosent matter if i play this on my laptop or my highend gaming pc.
settings are:
enable_water_wave = true
water_wave_height = 0.4
water_wave_speed = 50
water_wave_length = 20
enable_bumpmapping = true
parallax_mapping_mode = 2
parallax_mapping_scale = 0.08
parallax_mapping_bias = 0.04
Please add a few more lines around that error message, i need more details.




RealBadAngel wrote:My "fork" is updated with brand new calculations of tangent space.
Finally parallax mapping is looking as it should from any angle.
One problem left is kinda texture sliding, which is natural for it.
But i propably may have an idea how to solve it...
Meanwhile some new shots:
Without/Bump/Bump+Parallax mode 1
http://realbadangel.pl/images/wall1.png
http://realbadangel.pl/images/wall2.png
http://realbadangel.pl/images/wall3.png
and some reworked HDX texture too:
http://realbadangel.pl/images/hdx_bricks3.png
LionsDen wrote:Why do your bricks look all glassy with the bump mapping turned on? They don't look glassy in normal mode.
GLSL shader failed to compile
ERROR: 0:19: 'texelFetch' : no matching overloaded function found - implicit con
version not allowed
ERROR: 0:19: 'r' : field selection requires structure, vector, or matrix on lef
t hand side
ERROR: 0:23: '=' : cannot convert from 'const int' to 'float'
ERROR: 0:32: '==' : wrong operand types no operation '==' exists that takes a
left-hand operand of type 'float' and a right operand of type 'const int' (or th
ere is no acceptable conversion)
ERROR: 0:32: '>' : wrong operand types no operation '>' exists that takes a le
ft-hand operand of type 'float' and a right operand of type 'const int' (or ther
e is no acceptable conversion)
ERROR: 0:38: '==' : wrong operand types no operation '==' exists that takes a
left-hand operand of type 'float' and a right operand of type 'const int' (or th
ere is no acceptable conversion)
ERROR: 0:38: '>' : wrong operand types no operation '>' exists that takes a le
ft-hand operand of type 'float' and a right operand of type 'const int' (or ther
e is no acceptable conversion)
ERROR: 0:55: '==' : wrong operand types no operation '==' exists that takes a
left-hand operand of type 'float' and a right operand of type 'const int' (or th
ere is no acceptable conversion)
ERROR: 0:55: '>' : wrong operand types no operation '>' exists that takes a le
ft-hand operand of type 'float' and a right operand of type 'const int' (or ther
e is no acceptable conversion)
ERROR: 0:59: Unary operation not folded into constant
14:13:42: ERROR[main]: generate_shader(): failed to generate "solids_shader", ad
dHighLevelShaderMaterial failed.
GLSL shader failed to compile
ERROR: 0:92: '*' : wrong operand types no operation '*' exists that takes a le
ft-hand operand of type 'uniform float' and a right operand of type 'const int'
(or there is no acceptable conversion)
ERROR: 0:97: 'assign' : l-value required "uv" (can't modify a varying)
ERROR: 0:204: Unary operation not folded into constant
ERROR: 0:205: Unary operation not folded into constant
ERROR: 0:206: Unary operation not folded into constant
14:13:42: ERROR[main]: generate_shader(): failed to generate "liquids_shader", a
ddHighLevelShaderMaterial failed.
14:13:42: ERROR[main]: generateImage(): Could not load image "reflection.png" wh
ile building texture
14:13:42: ERROR[main]: generateImage(): Creating a dummy image for "reflection.p
ng"
Unsupported texture format
Loaded texture: E:/minetestshaders/minetest-0.4.7-382357d-rba-shaders-win32/text
ures/base/pack/sunrisebg.png
Loaded texture: E:/minetestshaders/minetest-0.4.7-382357d-rba-shaders-win32/text
ures/base/pack/sun.png
Loaded texture: E:/minetestshaders/minetest-0.4.7-382357d-rba-shaders-win32/text
ures/base/pack/moon.png
Loaded texture: E:/minetestshaders/minetest-0.4.7-382357d-rba-shaders-win32/text
ures/base/pack/sun_tonemap.png
Loaded texture: E:/minetestshaders/minetest-0.4.7-382357d-rba-shaders-win32/text
ures/base/pack/moon_tonemap.png
Font size: 8 17
14:06:46: INFO[main]: SourceShaderCache::getOrLoad(): Loading path "E:\minetestshaders\minetest-0.4.7-382357d-rba-shaders-win32\bin\..\client\shaders\solids_shader\base.txt"
14:06:46: INFO[main]: SourceShaderCache::getOrLoad(): Loading path "E:\minetestshaders\minetest-0.4.7-382357d-rba-shaders-win32\bin\..\client\shaders\solids_shader\opengl_vertex.glsl"
14:06:46: INFO[main]: SourceShaderCache::getOrLoad(): Loading path "E:\minetestshaders\minetest-0.4.7-382357d-rba-shaders-win32\bin\..\client\shaders\solids_shader\opengl_fragment.glsl"
14:06:46: INFO[main]: SourceShaderCache::getOrLoad(): No path found for "solids_shader\opengl_geometry.glsl"
14:06:46: INFO[main]: Compiling high level shaders for solids_shader
14:06:46: ERROR[main]: generate_shader(): failed to generate "solids_shader", addHighLevelShaderMaterial failed.
14:06:46: INFO[main]: SourceShaderCache::getOrLoad(): Loading path "E:\minetestshaders\minetest-0.4.7-382357d-rba-shaders-win32\bin\..\client\shaders\liquids_shader\base.txt"
14:06:46: INFO[main]: SourceShaderCache::getOrLoad(): Loading path "E:\minetestshaders\minetest-0.4.7-382357d-rba-shaders-win32\bin\..\client\shaders\liquids_shader\opengl_vertex.glsl"
14:06:46: INFO[main]: SourceShaderCache::getOrLoad(): Loading path "E:\minetestshaders\minetest-0.4.7-382357d-rba-shaders-win32\bin\..\client\shaders\liquids_shader\opengl_fragment.glsl"
14:06:46: INFO[main]: SourceShaderCache::getOrLoad(): No path found for "liquids_shader\opengl_geometry.glsl"
14:06:46: INFO[main]: Compiling high level shaders for liquids_shader
14:06:46: ERROR[main]: generate_shader(): failed to generate "liquids_shader", addHighLevelShaderMaterial failed.
14:06:46: INFO[main]: SourceShaderCache::getOrLoad(): Loading path "E:\minetestshaders\minetest-0.4.7-382357d-rba-shaders-win32\bin\..\client\shaders\alpha_shader\base.txt"
14:06:46: INFO[main]: SourceShaderCache::getOrLoad(): Loading path "E:\minetestshaders\minetest-0.4.7-382357d-rba-shaders-win32\bin\..\client\shaders\alpha_shader\opengl_vertex.glsl"
14:06:46: INFO[main]: SourceShaderCache::getOrLoad(): Loading path "E:\minetestshaders\minetest-0.4.7-382357d-rba-shaders-win32\bin\..\client\shaders\alpha_shader\opengl_fragment.glsl"
14:06:46: INFO[main]: SourceShaderCache::getOrLoad(): No path found for "alpha_shader\opengl_geometry.glsl"
14:06:46: INFO[main]: Compiling high level shaders for alpha_shader
14:06:46: INFO[main]: SourceImageCache::getOrLoad(): Loading path "E:\minetestshaders\minetest-0.4.7-382357d-rba-shaders-win32\bin\..\textures\base\pack\disable_img.png"
14:06:46: INFO[main]: SourceImageCache::getOrLoad(): No path found for "reflection.png"
14:06:46: ERROR[main]: generateImage(): Could not load image "reflection.png" while building texture
14:06:46: ERROR[main]: generateImage(): Creating a dummy image for "reflection.png"
hoodedice wrote:The windows debug console gave me a hard time. I however, managed to extract the following
So, the GLSL shaders did not compile after all...
I don't know if it is relevant or if it will help out at all, but just trying. =)
GLSL shader failed to compile
ERROR: 0:62: '*' : wrong operand types no operation '*' exists that takes a le
ft-hand operand of type '3-component vector of float' and a right operand of typ
e 'const int' (or there is no acceptable conversion)
ERROR: 0:65: 'assign' : cannot convert from '4-component vector of float' to '3
-component vector of float'
16:32:49: ERROR[main]: generate_shader(): failed to generate "solids_shader", ad
dHighLevelShaderMaterial failed.
GLSL shader failed to compile
ERROR: 0:32: '/' : wrong operand types no operation '/' exists that takes a le
ft-hand operand of type 'float' and a right operand of type 'int' (or there is n
o acceptable conversion)
ERROR: 0:32: '*' : wrong operand types no operation '*' exists that takes a le
ft-hand operand of type 'uniform float' and a right operand of type 'int' (or th
ere is no acceptable conversion)
ERROR: 0:32: '*' : wrong operand types no operation '*' exists that takes a le
ft-hand operand of type 'uniform float' and a right operand of type 'int' (or th
ere is no acceptable conversion)
ERROR: 0:33: '/' : wrong operand types no operation '/' exists that takes a le
ft-hand operand of type 'float' and a right operand of type 'int' (or there is n
o acceptable conversion)
ERROR: 0:33: '*' : wrong operand types no operation '*' exists that takes a le
ft-hand operand of type 'uniform float' and a right operand of type 'int' (or th
ere is no acceptable conversion)
ERROR: 0:33: '*' : wrong operand types no operation '*' exists that takes a le
ft-hand operand of type 'uniform float' and a right operand of type 'int' (or th
ere is no acceptable conversion)
ERROR: 0:33: '/' : wrong operand types no operation '/' exists that takes a le
ft-hand operand of type 'float' and a right operand of type 'const int' (or ther
e is no acceptable conversion)
ERROR: 0:33: '*' : wrong operand types no operation '*' exists that takes a le
ft-hand operand of type 'float' and a right operand of type 'int' (or there is n
o acceptable conversion)
16:32:49: ERROR[main]: generate_shader(): failed to generate "liquids_shader", a
ddHighLevelShaderMaterial failed.
Users browsing this forum: No registered users and 3 guests