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.

Topics - JeGX

Pages: 1 ... 11 12 [13] 14 15 ... 30
Forum en français / Filtre de post processing: Toonify
« on: May 24, 2014, 10:03:25 AM »
Voici un petit filtre GLSL sympa qui permet de toonifier ou cartooniser une image:



English forum / GLSL Hacker
« on: May 21, 2014, 11:43:20 AM »
A new dev version of GLSL Hacker is ready but only for Windows and Max OS X.

You can download it from this page:

Version - 2014.05.19
+ added emitter_set_spawn_positions() to gh_ps module.
+ added back_face_culling() and front_face_culling() to gh_renderer.
+ added box_create(), box_update_size() and sphere_create() to gh_utils.
+ added update_bounding_volume(), get_bounding_box_size(), get_bounding_sphere_center(),
  get_bounding_sphere_radius(), get_global_bounding_box_size(), get_global_bounding_sphere_center(),
  get_global_bounding_sphere_radius() to gh_object.

I added in the Windows version the PolyGon 3D object viewer in the apps/Polygon3DViewer/ folder.  Launch app_start_polygon_3d_object_viewer.bat to start GLSL Hacker with the Polygon3DViewer. Now you can drop any *.OBJ, *.3DS or *.FBX file.

English forum / (WIP) PhysX fluids - overflowing
« on: May 19, 2014, 08:15:58 PM »
A test with PhysX particles (fluid) and collisions with a mesh (a container). The overflowing of fluid is perfectly handled.

English forum / (WIP) - PolyGon 3D Object Viewer
« on: May 17, 2014, 10:33:16 PM »
Here are the first screenshots of PolyGon, a 3D object viewer coded with GLSL Hacker.

Under Windows, just drag and drop any 3D object file (*.3ds, *.obj, *.fbx) and is displayed with some basic info.
Drag and drop is managed by DRAG_N_DROP scripts (currently under Windows only).

English forum / GeForce GTX LED Logo Demo
« on: May 16, 2014, 04:17:55 PM »
There is a new demo in the code sample pack that shows how to control the LED logo of recent GeForce GTX cards.

The demo is available in the host_api/GEFORCE_GTX_LED/ folder.

The GEFORCE GTX LED is managed by three functions in the gh_gml module:

- gh_gml.geforce_logo_is_illumination_supported()
- gh_gml.geforce_logo_get_illumination()
- gh_gml.geforce_logo_set_illumination()

Here is a code snippet in Lua that checks the support of LED logo and sets the illumination to the max (min=0,  max=100):

Code: [Select]
gpu_index = 0  -- first GPU
if (gh_gml.geforce_logo_is_illumination_supported(gpu_index) == 1) then
  gh_gml.geforce_logo_set_illumination(gpu_index, 100)

English forum / Mesh PQ Torus Knot demo
« on: May 16, 2014, 02:21:24 PM »
GLSL Hacker adds the creation of PQ torus knot. A demo is available in the host_api/Mesh_PQTorusKnot/ folder of the code sample pack.

A gallery of various PQ torus knots is available here:

The following code:
Code: [Select]
steps = 1024
facets = 32
scale = 4.0
thickness = 0.5
clumps = 0
clump_offset = 0
clump_scale = 0.0
u_scale = 2
v_scale = 32
P = 3
Q = -7
pqtorus = gh_mesh.create_pqtorus(steps, facets, scale, thickness, clumps, clump_offset, clump_scale, u_scale, v_scale, P, Q)

will create this torus knot:

English forum / GLSL Hacker
« on: May 16, 2014, 01:44:34 PM »
A new dev version of GLSL Hacker is ready but only for Windows and Max OS X.

You can download it from this page:

Version - 2014.05.15
+ added OpenGL 4.0 shader subroutines support (gh_gpu_program.set_uniform_subroutine()).
+ added get_capability_4i() to gh_renderer.
+ added create_pqtorus() to gh_mesh.
+ added actor_add_force(), actor_add_force_at_position() and actor_set_kinematic_target()
  to gh_physx3 lib (lua/python).
* fixed a bug in AntTweakBar functions when the AntTweakBar plugin is not loaded.
+ added set_simulation_scales() to gh_physx3 lib (lua/python).

English forum / GLSL compiler: NVIDIA vs AMD vs Intel
« on: May 15, 2014, 02:13:05 PM »
Here is a thread where I store issues I encounter with NVIDIA, AMD and Intel GLSL compilers.

The following GLSL line is accepted by NVIDIA compiler (R337.50) but generates an error with Intel and AMD compilers:
Code: [Select]
  vec3 tc = vec4(0);

Of course the right line is
Code: [Select]
  vec3 tc = vec3(0);

English forum / Wireframe, solid and point rendering modes
« on: May 10, 2014, 12:07:00 PM »
Three new handy functions have been added to the renderer module: solid(), wireframe() and point(). These functions make it possible to quickly change the polygon rendering mode:

Wireframe mode:
Code: [Select]

Solid mode:
Code: [Select]

Point mode:
Code: [Select]

Forum en français / Mode fil de fer (wireframe), point et plein
« on: May 10, 2014, 12:04:18 PM »
trois petites fonctions pratiques ont été ajoutées au module renderer: solid(), wireframe() et point(). Ces deux fonctions permettent de changer en un clin d'oeil le mode de rendu des triangles:

Pour passer en mode fil de fer ou  wireframe
Code: [Select]

Pour passer en mode plein (ou solid)
Code: [Select]

Pour passer en mode point
Code: [Select]

English forum / OpenGL 4.4 Bindless textures
« on: May 09, 2014, 04:01:21 PM »
The code sample pack includes now two simple demos of OpenGL 4.4 bindless textures:  host_api/GLSL_Bindless_Textures_OpenGL44/

The first demo uses two textures and shows how to set them as resident ( gh_texture.bindless_make_resident )
and how to read them from a pixel shader:

The second demo loads a pack of 32 textures and performs caustic animation.  The demo shows how to read an array of bindess textures in a pixel shader:

English forum / AntTweakBar plugin
« on: May 09, 2014, 03:27:18 PM »
AntTweakBar support has been added to GLSL Hacker.
This support is currently limited to Lua scripts. Here is a quick overview of how to use the new ATB functions:

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

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

FRAME script:
Code: [Select]

-- Now the x var is updated and ready for use:
gh_utils.font_render(font, 10, 40, 1.0, 1.0, 1.0, 1.0, "x = " .. x)


A demo is available in the code sample pack: host_api/AntTweakBar/

The AntTwekBar plugin is available for Windows, Linux and Mac OS X:

So far the PhysX 3 plugin was available for the Windows and OS X versions of GLSL Hacker only. A linking issue under Linux prevented from releasing this plugin. But thanks to the great tech support from NVIDIA, I managed to link the plugin with PhysX 3 libs. Cool!

GLSL Hacker v0.6.3.19 is the first version available with the PhysX plugin for Linux.

All PhysX code samples are available in the code sample pack: host_api/PhysX3/

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_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:

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]

-- 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)


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:

Pages: 1 ... 11 12 [13] 14 15 ... 30