You will not be able to run shaders whatsoever.hoodedice wrote: intel GMA
Sorry bud.
There aren't any Direct X shaders currently.tinoesroho wrote:... DirectX is on, innit?
I heard that there are ways that OpenGL shaders can be converted to Direct X shaders. As you said, of course, the OpenGL shaders do have to be stable first.RealBadAngel wrote:First lets have OpenGL up n runnin.Inocudom wrote:There aren't any Direct X shaders currently.tinoesroho wrote:... DirectX is on, innit?
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
Please do build it again and see first post about settings.PilzAdam wrote: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: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
I guess you mean pull and rebuild?RealBadAngel wrote:Please do build it again and see first post about settings.PilzAdam wrote: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: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
Code: Select all
/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>)'
Code: Select all
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";
Code: Select all
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";
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";
It pleases me greatly to see you supporting RealBadAngel's shaders, PilzAdam.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):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";
That does not sound good. Why would Irrlicht not have such a feature?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.
Please add a few more lines around that error message, i need more details.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
Those are not errors but your OpenGL, I guess youre using open drivers.sfan5 wrote:It would be nice if you could fix these errors:
http://pastebin.com/WE4H6FGi
I'm pretty sure that are errors..RealBadAngel wrote:Those are not errors but your OpenGL
RealBadAngel wrote:Whats your OpenGL version?
Code: Select all
$ 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
They run in FlightGear, but they cause tons of lag. I was just gonna check out what they looked like.Jordach wrote:You will not be able to run shaders whatsoever.hoodedice wrote: intel GMA
Sorry bud.
I'm not using it (I guess). Well, minetest reports that my OpenGL version is 2.0 so maybe I'm running OpenGL. Again, I don't think sfan made a build with DirectX.sfan5 wrote:Don't use DirectXhoodedice wrote:For me, I get it all red. (Using sfan's build posted above.) Windows x86 XP with intel GMA
[The extension avi has been deactivated and can no longer be displayed.]
Code: Select all
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.2
okay after i read your message i was looking whats the difference between the two computers. after a update for the newest OpenGL on the big one, i dont get this error anymore. so looks like this is something with the OpenGL drivers which cause the problem.RealBadAngel wrote:Please add a few more lines around that error message, i need more details.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
Users browsing this forum: No registered users and 3 guests