zyzz1995
-
Posts
19 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by zyzz1995
-
-
4 hours ago, AggrorJorn said:
Use GetMousePosition() and then the Z axis for the mouse wheel. https://www.leadwerks.com/learn?page=API-Reference_Object_Window_GetMousePosition
Very nice btw, I never could get NoesisUI to work properly.
Thank you for you help!I will take a look at the api document.
2 hours ago, Josh said:Looks cool. We also have a built-in GUI system that can be customized:
https://www.leadwerks.com/learn?page=API-Reference_Object_WidgetYes, 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.
2 hours ago, jen said:Very cool! Is this ready for production?
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.
- 1
- 1
-
on thank you, it worked now.
-
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
-
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.
-
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.
- 1
-
-
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; }
-
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.
-
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.
-
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.
-
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.
-
Sadly most people on the Leadwerks forum use lua so C++ talk is kind of scarce. You'll need to purchase the Professional Edition DLC if you haven't already.
First, join the beta branch. Leadwerks is going forward with Visual Studio 2017, and you can get the IDE here. Please note that Visual Studio is for Windows, and Code::Blocks is only for Linux.
When you create a project or update an existing project, the project files for both IDE's will get cloned to your project. The code is set up to launch the engine, and call Main.lua/App.lua script.
Again, Leadwerks at the moment is more focused on Lua, and I personally recommend only using C++ for program management (Time, level loading, etc) over game objects. (doors, swtiches)
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.
-
Hi, guys
I am learning leadwerks to develop a game of my own, Lua is quite good, but now I need some information about using c++. I've searched web, just found very few topics about it, and they seems to be a little outdated, since the c++ project structure of leadwerks4 has changed a lot. So I do need some help about it, anyone can show me some very basic c++ tutorials of leadwerks, like how the c++ project organized, how can I make a project file for code::blocks and how can I compile my project without leadwerks editor.
Any help will be appreciated.
-
it seems that few people care about leadwerks on linux though it is one of the main target platforms of leadwerks.
Maybe i should solve this problem by myself, just like in a linuxer way.
-
This is a well known problem. It existed since the release of Leadwerks on Linux.
Really? I am new to leadwerks so I have no ideal about that. Any solutions?
-
Hi, today I have a strange problem with the Leadwerks' model editor when it's displaying animation models. The animations cannot be displayed completely, just part of them. And the editor itself also has some problems, the buttons are just blank without any icons or text on them. I will show you the screenshots below. Any one has the same problem? Is that a bug? Waiting for your help.
Hardware & Software of my computer:
OS: Ubuntu 14.04
LeadwerksSteam edition / Professional edition
Cpu: Intel Xeon® CPU E5-2670 0 @ 2.60GHz × 16
Graphics Card: AMD Radeon R9 370 Series
Intergrated NoesisGUI into LE(Partly Works)!
in General Discussion
Posted
[Update]Test NoesisGUI with a 3D scene in Leadwerks. Worked.