Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - JeGX

Pages: 1 ... 3 4 [5] 6 7 ... 29
81
Forum en français / Transmission de données entre Python et Lua
« on: May 09, 2014, 02:53:29 PM »
GLSL Hacker peut etre scripté en Lua ou en Python. En fait, une demo peut même être scripté avec les deux languages en meme temps. Le seul problème c'est que ces deux languages sont isolés dans leur propre environnement (leur machine virtuelle) et n'ont aucun moyen pour communiquer entre eux (ce qui est normal). Mais le cas particulier de GLSL Hacker, on peut  très bien imaginer une demo qui va interroger le web en Python et faire le rendu en Lua. Il est donc important de pouvoir passer des valeurs entre les deux languages. Une solution existe dans GLSL Hacker au moyen des variables partagées  (les shared variables).

Voila comment creer une variable lua_counter en Lua:

script INIT
Code: [Select]
lua_counter = 0
gh_utils.shared_variable_create("lua_counter")
gh_utils.shared_variable_set_value_4i("lua_counter", 0, 0, 0, 0)

Dans le script FRAME, on incremente la variable:
Code: [Select]
lua_counter = lua_counter+1
gh_utils.shared_variable_set_value_4i("lua_counter", lua_counter, 0, 0, 0)


Dans le script Python, on peut lire la variable partagée:
Code: [Select]
x, y, z, w = gh_utils.shared_variable_get_value_4i("lua_counter")

Une demo est dispo dans le code sample pack: host_api/Lua_Python_SharedVar/

La partie superieure de la fenetre est gerée par le Lua tandis que Python gère le bas:



82
Forum en français / Le plugin AntTweakBar
« on: May 09, 2014, 02:23:11 PM »
AntTweakBar est une petite librairie super utile pour manipuler de manière interactive les variables. La plupart du temps elle est directement utilisée dans des applis en C/C++.

Les fonctionnalités d'AntTweakBar sont maintenant disponibles dans GLSL Hacker grace à un plugin. Pour le moment, seul les scripts en Lua bénéficient de ces nouvelles fontionnalités. Pour le support du Python, je verrai ça un autre jour.





Actuellement seules les variables simples (les float) et les varaibles de type xyz et rgba sont supportées. Voilà comment on crée une tweakbar pour manipuler une varaible Lua x:

script INIT:
Code: [Select]
bar1 = gh_utils.twbar_create("TweakBar")

x = 0
gh_utils.twbar_add_var_float(bar1, "x")



Dans le script FRAME, il faut updater la tweakbar afin que les variables soient mises à jour  et rendre la tweakbar:

script FRAME:
Code: [Select]
gh_utils.twbar_update()

-- Maintenant la variable x est mise a jour:
--
gh_utils.font_render(font, 10, 40, 1.0, 1.0, 1.0, 1.0, "x = " .. x)


gh_utils.twbar_draw()


Une demo complete est dispo dans le code sample pack: host_api/AntTweakBar/

Le plugin AntTwekBar est dispo pour Windows, Linux et Mac OS X:





83
Forum en français / Grille de reference
« on: May 09, 2014, 02:01:54 PM »
A partir de GLSL Hacker v0.6.3.19, un object grille de reference est disponible. Cette grille est disponible
aussi bien en ancien OpenGL qu'en OpenGL moderne (OpenGL 3+ core profile).



La demo dans le code sample pack: moon3d/gl-320-reference-grid/

Tous les parametres important de la grille peuvent etre manipulés: dimensions, nombre de subdivisions,
couleur des lignes. Voici comment la créer (dans un script d'INIT par exemple):

Code: [Select]
grid = gh_utils.grid_create()
gh_utils.grid_set_geometry_params(grid, 10, 10, 20, 20)
gh_utils.grid_set_lines_color(grid, 0.7, 0.7, 0.7, 1.0)
gh_utils.grid_set_main_lines_color(grid, 1.0, 1.0, 0.0, 1.0)
gh_utils.grid_set_main_x_axis_color(grid, 1.0, 0.0, 0.0, 1.0)
gh_utils.grid_set_main_z_axis_color(grid, 0.0, 0.0, 1.0, 1.0)
local display_main_lines = 1
local display_lines = 1
gh_utils.grid_set_display_lines_options(grid, display_main_lines, display_lines)


Pour le rendu, rien de bien compliqué, il suffit juste d'avoir un simple GPU program de couleur:

Code: [Select]
gh_gpu_program.bind(simple_color_prog)
gh_object.render(grid)



84
English forum / Reference grid (GLSL Hacker v0.6.3.19+)
« on: May 09, 2014, 01:29:33 PM »
A new object  is available since version  v0.6.3.19+: a reference grid:



A demo is available in the code sample pack: moon3d/gl-320-reference-grid/

Here is the way to create a ref grid:

Code: [Select]
grid = gh_utils.grid_create()
gh_utils.grid_set_geometry_params(grid, 10, 10, 20, 20)
gh_utils.grid_set_lines_color(grid, 0.7, 0.7, 0.7, 1.0)
gh_utils.grid_set_main_lines_color(grid, 1.0, 1.0, 0.0, 1.0)
gh_utils.grid_set_main_x_axis_color(grid, 1.0, 0.0, 0.0, 1.0)
gh_utils.grid_set_main_z_axis_color(grid, 0.0, 0.0, 1.0, 1.0)
local display_main_lines = 1
local display_lines = 1
gh_utils.grid_set_display_lines_options(grid, display_main_lines, display_lines)


The rendering:
Code: [Select]
gh_gpu_program.bind(simple_color_prog)
gh_object.render(grid)



85
Big Pictures / Unreal Engine 4 - Shooter game demo (Direct3D 11)
« on: May 01, 2014, 02:32:49 PM »
Unreal Engine 4 - Shooter game demo (D3D11)

The shooter game can be downloaded HERE




90
Just tested one of the PhysX3 demos of the code sample pack (host_api/PhysX3/Fluids/) with the DEV version I'm working on (v0.6.3.18) and now collisions of a fluid with a static mesh work fine. In the following screenshot, two particle emitters are inside a mesh box:




With prev versions, collisions were not handled with GPU fluids and CPU fluids led to a crash...

91
English forum / Re: GLSLHacker not starting
« on: April 12, 2014, 01:32:28 PM »
Try the latest 0.6.3.13 DEV version available here:

http://www.geeks3d.com/glslhacker/download.php

If the bug is still there, move in another place the following plugins in GLSL Hacker folder:
- plugins/plugin_gxl3d_gpu_monitor_gml_x64.dll
- plugins/plugin_gxl3d_opencl_x64.dll

In any case, let me know.

92
Big Pictures / ASUS GeForce GTX 750 Ti OC Unboxing
« on: April 11, 2014, 02:00:42 PM »
ASUS GeForce GTX 750 Ti OC (GTX750TI-OC-2GD5)














Unboxing possible thanks to the guys at internex.ch

93
Big Pictures / ASUS Geforce GTX 780 DirectCU II OC Unboxing
« on: April 11, 2014, 01:07:42 PM »
GeForce GTX 780 DirectCU II OC (GTX780-DC2OC-3GD5)

Unboxing thanks to the guys at internex.ch

This GTX 780 has been launched few months ago but it still cool to have some big pictures of that card, better later than never!















94
Thanks for the bug report. I fixed the shader and it will be available in the next update.

95
Yes, since v0.6.3.9, GLSL Hacker supports MRT.

There should be a demo in the code sample pack /host_api/MultipleRenderTargets/

To create a render target with two color buffers:

Code: [Select]
num_color_targets = 2
rt01 = gh_render_target.create_v2(width, height, num_color_targets)


When you need to bind color buffers as textures, just do:

Code: [Select]
gh_texture.rt_color_bind_v2(rt01, 0, 0) -- Color texture 0 on texture unit 0
gh_texture.rt_color_bind_v2(rt01, 1, 1) -- Color texture 1 on texture unit 1

In the fragment shader, just declare several outputs:
Code: [Select]
out vec4 FragData[2];

Let me know if the code sample pack is not up to date.
Hope that helps.

96
Quote
University of California researchers have created a system that shows how the brain works in real time, allowing users to navigate right inside their own heads and see their neuronal activity firing in three dimensions, showing “real-time source-localised activity from electroencephalographic signals”.

http://www.gizmodo.com.au/2014/03/scientists-create-system-that-shows-your-brain-activity-in-3d/

97
Quote
The two consoles' Graphics Processing Units - called Flipper on the GameCube and Hollywood on the Wii - have a lot in common with their modern PC counterparts, but there are just enough differences to make perfect emulation an absolute nightmare. One quirk in particular is the use of integer math within the console GPU pipeline - as opposed to floating point math which is the norm for PC GPUs.

https://dolphin-emu.org/blog/2014/03/15/pixel-processing-problems/

98
GpuTest / Re: GpuTest 0.7.0
« on: March 13, 2014, 05:46:23 PM »
I wonder, what's the point of GpuTest if it only works with Nouveau drivers, which are slow and don't even give an accurate measure of the power of my GPU? There's probably something I don't understand.

Fortunately, GpuTest works also with NVIDIA and AMD binary drivers (otherwise GpuTest would be useless, open source drivers are not my passion). Most of the time, my linux boxes have proprietary drivers and tests like TessMark or Julia FP64 work only with NV / AMD binary drivers. I always develop with real NV/AMD drivers and I test open source drivers only before release. Maybe your drivers are not properly installed and something is perturbing GpuTest, I don't know. Wait for the next release of NV drivers for Linux (follow geeks3d news ;) ) and do a new test again.

*Warning: Quite off-topic and not really concerning GpuTest*
On the bright side tho, you Sir may have stopped me from buying a new (unnecessary) video card.
I had a lot of faith in you lol and I was surprised when you said it could just be the drivers.
So I finally found the right tutorial and managed to install the correct drivers. And my video card now does what it's born to do :P
I went from 15 fps on Team Fortress 2 to 200 fps :D!

Thanks a lot JeGX!
<3
You're welcome!

99
GpuTest / Re: GpuTest 0.7.0
« on: March 12, 2014, 05:01:38 PM »
Thanks for the feedback Stebs.

The engine behind GpuTest supports core profile but it's likely a bad setting in GpuTest. I will look at this issue asap.

Pages: 1 ... 3 4 [5] 6 7 ... 29