Jump to content

zyzz1995

Members
  • Content Count

    19
  • Joined

  • Last visited

Community Reputation

8 Neutral

About zyzz1995

  • Rank
    Member

Recent Profile Visitors

1,126 profile views
  1. [Update]Test NoesisGUI with a 3D scene in Leadwerks. Worked.
  2. Thank you for you help!I will take a look at the api document. Yes, the built-in GUI is also very cool and convenient, but there is a problem that the Leadwerk4.x itself does not support UTF text. So i have to find someting else for substitution until the release of LE5. And NoesisGUI works well with UTF text as i see. Nope.There remains some issues to solve and more tests are needed. When i think it is rubost enough i will release it as an open-source project to the community.
  3. Hey, guys i am looking for a third-party GUI system for Leadwerks Engine, and i find this project https://github.com/FourthQuarter/NoesisLeadwerksWrapper which is a NoesisGUI intergration for Leadwerks. But it is too old to run with the current version of LE and Noesis. So i modify the source code and finally make it run with LE again, however there still are some problems, such as the wheel event does not work, i think i can repair it if someone told me how to capture the mouse wheel event in LE. Anyway, the result looks good so far. More test to run. Some pics to show.
  4. LE5 sounds great, however still have some questions about LE4.x. 1. Will the 4.4 be the last version of 4.x? 2. What are the main new features will be added in the version 4.4? 3. Is that possible to see the visual GUI editor before 5 released? 4. After 5 is released, will the 4.x still be officially maintained and supported, like docs and bugfix updates? Because of some payment problems, it unlikely for me to have a monthly subscription version. So the steam edition and version 4.x could be the only option for me.
  5. it is very odd that it seems that the frame rate or say UPS is limited in 30 or 60, the same map i get 200+ on Linux but i get very stable fps of 60 on windows, is there any special mechanism to make sure the fps would never higher than 60 on windows? just for curiosity? Thx
  6. yes, it currently runs on windows and linux, later maybe mac os, as for mobile or web i guess it still has long way to go.
  7. i find that shader is really important in game development but i know little about it. Now i want to learn how to write shader for leadwerks but i just don't where to start, is there any info or tutorials about LE shaders.
  8. Sorry for the link, it is ok now. I will check what you posted later.Anyway thanks for help.
  9. I just found really awesome edge glow effect on ShaderToy, here is the link I don't know if the LE have some similar effect or if it possible to port it to LE. I know nothing about shader, so maybe this is a stupid question. I think i should spend some time on learning it though some of my friends told me that it was very difficult. EDIT: the link is repaired now. Sorry for the broken link before. And below is the shader code. // shader input uniform vec3 iResolution; // viewport resolution (in pixels) uniform float iGlobalTime; // shader playback time (in seconds) uniform float iTimeDelta; // render time (in seconds) uniform int iFrame; // shader playback frame uniform float iChannelTime[4]; // channel playback time (in seconds) uniform vec3 iChannelResolution[4]; // channel resolution (in pixels) uniform vec4 iMouse; // mouse pixel coords. xy: current (if MLB down), zw: click uniform samplerXX iChannel0..3; // input channel. XX = 2D/Cube uniform vec4 iDate; // (year, month, day, time in seconds) uniform float iSampleRate; // sound sample rate (i.e., 44100) float d; float lookup(vec2 p, float dx, float dy) { vec2 uv = (p.xy + vec2(dx * d, dy * d)) / iResolution.xy; vec4 c = texture(iChannel0, uv.xy); // return as luma return 0.2126*c.r + 0.7152*c.g + 0.0722*c.b; } void mainImage( out vec4 fragColor, in vec2 fragCoord ) { d = sin(iGlobalTime * 5.0)*0.5 + 1.5; // kernel offset vec2 p = fragCoord.xy; // simple sobel edge detection float gx = 0.0; gx += -1.0 * lookup(p, -1.0, -1.0); gx += -2.0 * lookup(p, -1.0, 0.0); gx += -1.0 * lookup(p, -1.0, 1.0); gx += 1.0 * lookup(p, 1.0, -1.0); gx += 2.0 * lookup(p, 1.0, 0.0); gx += 1.0 * lookup(p, 1.0, 1.0); float gy = 0.0; gy += -1.0 * lookup(p, -1.0, -1.0); gy += -2.0 * lookup(p, 0.0, -1.0); gy += -1.0 * lookup(p, 1.0, -1.0); gy += 1.0 * lookup(p, -1.0, 1.0); gy += 2.0 * lookup(p, 0.0, 1.0); gy += 1.0 * lookup(p, 1.0, 1.0); // hack: use g^2 to conceal noise in the video float g = gx*gx + gy*gy; float g2 = g * (sin(iGlobalTime) / 2.0 + 0.5); vec4 col = texture(iChannel0, p / iResolution.xy); col += vec4(0.0, g, g2, 1.0); fragColor = col; } Found a Leadwerks version of the abvoe shader, but can't get it working #version 400 uniform sampler2D texture1; uniform bool isbackbuffer; uniform vec2 buffersize; uniform float currenttime; out vec4 fragData0; #define time currenttime * 0.05 float d = sin(time * 5.0)*0.5 + 1.5; // kernel offset float lookup(vec2 p, float dx, float dy) { vec2 uv = (p.xy + vec2(dx * d, dy * d)) / buffersize.xy; vec4 c = texture(texture1, uv.xy); // return as luma return 0.2126*c.r + 0.7152*c.g + 0.0722*c.b; } void main(void) { vec2 icoord = vec2(gl_FragCoord.xy/buffersize); if (isbackbuffer) icoord.y = 1.0 - icoord.y; vec2 p = gl_FragCoord.xy/buffersize; if (isbackbuffer) p.y = 1.0 - p.y; p*=buffersize; // simple sobel edge detection float gx = 0.0; gx += -1.0 * lookup(p, -1.0, -1.0); gx += -2.0 * lookup(p, -1.0, 0.0); gx += -1.0 * lookup(p, -1.0, 1.0); gx += 1.0 * lookup(p, 1.0, -1.0); gx += 2.0 * lookup(p, 1.0, 0.0); gx += 1.0 * lookup(p, 1.0, 1.0); float gy = 0.0; gy += -1.0 * lookup(p, -1.0, -1.0); gy += -2.0 * lookup(p, 0.0, -1.0); gy += -1.0 * lookup(p, 1.0, -1.0); gy += 1.0 * lookup(p, -1.0, 1.0); gy += 2.0 * lookup(p, 0.0, 1.0); gy += 1.0 * lookup(p, 1.0, 1.0); //hack: use g^2 to conceal noise in the video float g = gx*gx + gy*gy; float g2 = g * (sin(time) / 2.0 + 0.5); vec4 col = texture(texture1, p / buffersize.xy); col += vec4(0.0, g, g2, 1.0); fragData0 = col; }
  10. I just thought of a solution to make a night sky with a moon, maybe I could replace the daynight.mat with a night sky mat, i just do not know how to make one.
  11. It worked! Thank you very much! Now I am thinking about if i can make a night sky with a moon based this shader. Anyway it helped a lot.
  12. hi, guys. I've seen the day and night cycle effect created by Shadmar on youtube, and found this thread http://www.leadwerks.com/werkspace/topic/10334-day-and-night-cycle-shader/, it looks incredibly amazing, however i just cannot find any download link, i cannot find it on ws either. Does this shader work for LE4? if so where can i get it? if not how to implement one?Any help will be appreciated.
  13. I just compile my first c++ project in code::blocks with gcc successfully. But you should turn on the 'std=c++11' flag before you compile, or you will get some errors.
  14. thank you for your help, I found the project file in "Projects/Linux/<your_project_name>.cbp". And I agree that using Lua together with c++ is a very good ideal. using Lua for basic game logic and game objects can improve develop efficiency, cause Lua is much easier to learn and use. However in some cases, we have to use c++ to do heavy stuff(such as some AI algorithms requiring a lot of computation) or to integrate third-party libs. All these are the reasons why I ask for c++ tutorials. Again thank for your help.
×
×
  • Create New...