Jump to content

Normal maps (and rend2)


Recommended Posts

I wondered what the trick is to make normal maps look correct in rend2 (or in baseJKA for that matter). At the moment it looks and behaves the same way it did when I tried this a year-ish ago before rend2 was in the works/ports. It all looks like big plastic bubbles, or the textures get random dark spots spread out, no matter what I test it on.

 

Shader:

 

 

 

textures/bootland/concrete_wall
{
    qer_editorimage textures/bootland/concrete_wall
    q3map_normalimage textures/bootland_nmaps/concrete_wall_nmap.tga
    q3map_lightmapsamplesize 2x2
    q3map_shadeangle 60 //have tried other angles
    {
    map $lightmap
    rgbGen identity
    }
    {
    map textures/bootland/concrete_wall
    blendFunc GL_DST_COLOR GL_ZERO
    }
}

etc...

 

 

 

Test-screenshots:

 

 

 

Link to comment

To make normal maps work with rend2, you need this kind of shader:

 

    textures/vehicles/car
    {
        qer_editorimage textures/vehicles/car.jpg

        {
            map textures/vehicles/car.jpg
            rgbGen vertexLit
        }
        {
            stage normalparallaxmap
            map textures/vehicles/car_n.jpg
        }
        {
            stage specularmap
            map textures/vehicles/car_s.jpg
        }
    }

Fake bump mapping should only be used for vanilla renderer.

Boothand likes this
Link to comment

Hmm I'm starting to suspect I haven't been running rend2 properly if at all. Might explain why I didn't ever see a difference. I compiled rend2 (from openjk's rend2 branch) just like openJK, with rend2 included, and threw the DLLs in my GameData folder. Feel free to point me to the correct way of doing it!

 

In any case, the main error I got in-game was that the "stage" keyword wasn't recognized.

Link to comment

Rend2 uses a specific normalmap shader line which doesnt exist in baseja or q3map2. This must be put into a .mtr file which will overwrite the info in the .shader file (should your renderer be set to rd-rend2)

 

q3map2 "faked" bumpmaps/normalmaps arent all that great - theres a tutorial on how to use it properly in the tuts section. Remember, the bigger the brush the lower quality the lightmap as theyre always 128x128 pixels and so look much worse over bigger lightmap surfaces, so you're best using multiple small patches to get the best effects.

 

Did you actually change to the rend2 renderer using "cl_renderer rd-rend2" (into the console?)

Link to comment

Rend2 uses a specific normalmap shader line which doesnt exist in baseja or q3map2. This must be put into a .mtr file which will overwrite the info in the .shader file (should your renderer be set to rd-rend2)

[...]

Did you actually change to the rend2 renderer using "cl_renderer rd-rend2" (into the console?)

 

Ah, I hadn't! Have I missed out on any crucial guides I should read? :D

 

Ok, so I'm currently crashing on startup, as it can't read my old shaders. I understand it you can use both .shader or .mtr. But all the normalmap shaders must be in .mtr then?

 

I suppose my other shaders are currently incompatible the way they're written? This is what I can find at the moment: http://jkhub.org/topic/2865-rend2-shader-manual/

Link to comment

It can read old shaders exactly as the base renderer does.

 

Your .mtr will basically be an identical copy of your original .shader, WITH any rend2 specific stages (such as normalparralaxmap) added to make use of its features. That way users can swap between renderers at will with no compatibility issues.

Boothand likes this
Link to comment
Hmm, okay, I copied the shader where I put all my normalmaps, named it the same with .mtr. Then I deleted the stages that were rend2 specific in the original .shader one.

 

I suspect something else may be causing this error though.

 

Huge console dump:

 


 



OpenJK-MP: v1.0.1.0 win_msvc-x86 Feb 24 2014
----- FS_Startup -----
Current search path:
C:\Users\Rune\Documents\My Games\OpenJK\base
C:\Spel\JKA\GameData\base\templeofmechanism.pk3 (96 files)
C:\Spel\JKA\GameData\base\szico_bootland.pk3 (23 files)
C:\Spel\JKA\GameData\base\moose.pk3 (7 files)
C:\Spel\JKA\GameData\base\mapextras.pk3 (55 files)
C:\Spel\JKA\GameData\base\BlueIce Nightfall.pk3 (248 files)
C:\Spel\JKA\GameData\base\assets3.pk3 (16 files)
C:\Spel\JKA\GameData\base\assets2.pk3 (62 files)
C:\Spel\JKA\GameData\base\assets1.pk3 (8320 files)
C:\Spel\JKA\GameData\base\assets0.pk3 (15346 files)
C:\Spel\JKA\GameData\base

----------------------
24173 files in pk3 files
execing mpdefault.cfg
execing openjk.cfg
couldn't exec autoexec.cfg

------- Input Initialization -------
Skipping check for DirectInput
Joystick is not active.
------------------------------------
----- Initializing Renderer ----
Trying to load "rd-rend2_x86.dll" from "C:\Spel\JKA\GameData"...
QKEY found.
----- R_Init -----
...initializing QGL
succeeded
...setting mode 8: 1280 1024 FS
...using colorsbits of 32
...calling CDS: failed, bad mode
...trying next higher resolution: failed, bad mode
...restoring display settings
...WARNING: fullscreen unavailable in this mode
...setting mode 3: 640 480 FS
...using colorsbits of 16
...calling CDS: ok
...created window@0,0 (640x480)
Initializing OpenGL driver
...getting DC: succeeded
...GLW_ChoosePFD( 16, 24, 8 )
...65 PFDs found
...hardware acceleration found
...PIXELFORMAT 2 selected
...creating GL context: succeeded
...making context current: succeeded
Initializing OpenGL extensions
...GL_EXT_texture_compression_s3tc available
...ignoring texture compression
...using GL_EXT_texture_env_add
...GL_EXT_texture_filter_anisotropic available
...using GL_EXT_texture_filter_anisotropic
...Using GL_EXT_texture_edge_clamp
...using WGL_EXT_swap_control
...using GL_ARB_multitexture
...using GL_EXT_compiled_vertex_array
...using GL_EXT_point_parameters
...GL_NV_register_combiners not found
...using GL_EXT_draw_range_elements
...using GL_EXT_multi_draw_arrays
...using GL_ARB_vertex_program
...using GL_ARB_vertex_buffer_object
...using GL_ARB_shader_objects
...using GL_ARB_vertex_shader
...using GLSL version 1.30
...using GL_ARB_texture_non_power_of_two
...using GL_ARB_texture_float
...using GL_ARB_half_float_pixel
...using GL_EXT_framebuffer_object
...using GL_EXT_packed_depth_stencil
...using GL_ARB_occlusion_query
...using GL_EXT_framebuffer_blit
...using GL_EXT_framebuffer_multisample
...ignoring GL_EXT_texture_sRGB
...ignoring GL_EXT_framebuffer_sRGB
...GL_EXT_texture_sRGB_decode not found
...ignoring GL_EXT_texture_compression_latc
...GL_ARB_texture_compression_bptc not found
...using GL_ARB_draw_buffers
...GL_ARB_depth_clamp not found
...GL_ARB_seamless_cube_map not found
------- FBO_Init -------
------- GLSL_InitGPUShaders -------
#version 130
#define varying in
out vec4 out_Color;
#define gl_FragColor out_Color
#ifndef M_PI
#define M_PI 3.14159265358979323846f
#endif
#ifndef deformGen_t
#define deformGen_t
#define DGEN_WAVE_SIN 1
#define DGEN_WAVE_SQUARE 2
#define DGEN_WAVE_TRIANGLE 3
#define DGEN_WAVE_SAWTOOTH 4
#define DGEN_WAVE_INVERSE_SAWTOOTH 5
#define DGEN_BULGE 7
#define DGEN_MOVE 8
#endif
#ifndef tcGen_t
#define tcGen_t
#define TCGEN_LIGHTMAP 2
#define TCGEN_TEXTURE 3
#define TCGEN_ENVIRONMENT_MAPPED 4
#define TCGEN_FOG 5
#define TCGEN_VECTOR 6
#endif
#ifndef colorGen_t
#define colorGen_t
#define CGEN_LIGHTING_DIFFUSE 11
#endif
#ifndef alphaGen_t
#define alphaGen_t
#define AGEN_LIGHTING_SPECULAR 6
#define AGEN_PORTAL 8
#endif
#ifndef texenv_t
#define texenv_t
#define TEXENV_MODULATE 8448
#define TEXENV_ADD 260
#define TEXENV_REPLACE 7681
#endif
#ifndef r_FBufScale
#define r_FBufScale vec2(0.001563, 0.002083)
#endif
#define RGBM_LIGHTMAP
#line 0
uniform sampler2D u_DiffuseMap;

#if defined(USE_LIGHTMAP)
uniform sampler2D u_Lig
tMap;

uniform int u_Texture1Env;
#endif

varying vec2 var_DiffuseTex;

#if defined(USE_LIGHTMAP)
varying vec2 var_LightTex;
#endif

varying vec4 var_Color;


void main()
{
vec4 color = texture2D(u_DiffuseMap, var_DiffuseTex);
#if defined(USE_LIGHTMAP)
vec4 color2 = texture2D(u_LightMap, var_LightTex);
#if defined(RGBM_LIGHTMAP)
color2.rgb *= 32.0 * color2.a;
color2.a = 1.0;
#endif

if (u_Texture1Env == TEXENV_MODULATE)
{
color *= color2;
}
else if (u_Texture1Env == TEXENV_ADD)
{
color += color2;
}
else if (u_Texture1Env == TEXENV_REPLACE)
{
color = color2;
}
#endif

gl_FragColor = color * var_Color;
}

compile log:
Fragment shader failed to compile with the following errors:
ERROR: 0:3: '' : Declaration must include a precision qualifier or the default precision must have been previously declared.
ERROR: 0:9: '' : Declaration must include a precision qualifier or the default precision must have been previously declared.
ERROR: 0:15: '' : Declaration must include a precision qualifier or the default precision must have been previously declared.
ERROR: 0:20: '' : Declaration must include a precision qualifier or the default precision must have been previously declared.
ERROR: compilation errors. No code generated.

*******************
ERROR: Couldn't compile shader
********************
RE_Shutdown( 0 )
----- R_Init -----
------- FBO_Init -------
------- GLSL_InitGPUShaders -------
#version 130
#define varying in
out vec4 out_Color;
#define gl_FragColor out_Color
#ifndef M_PI
#define M_PI 3.14159265358979323846f
#endif
#ifndef deformGen_t
#define deformGen_t
#define DGEN_WAVE_SIN 1
#define DGEN_WAVE_SQUARE 2
#define DGEN_WAVE_TRIANGLE 3
#define DGEN_WAVE_SAWTOOTH 4
#define DGEN_WAVE_INVERSE_SAWTOOTH 5
#define DGEN_BULGE 7
#define DGEN_MOVE 8
#endif
#ifndef tcGen_t
#define tcGen_t
#define TCGEN_LIGHTMAP 2
#define TCGEN_TEXTURE 3
#define TCGEN_ENVIRONMENT_MAPPED 4
#define TCGEN_FOG 5
#define TCGEN_VECTOR 6
#endif
#ifndef colorGen_t
#define colorGen_t
#define CGEN_LIGHTING_DIFFUSE 11
#endif
#ifndef alphaGen_t
#define alphaGen_t
#define AGEN_LIGHTING_SPECULAR 6
#define AGEN_PORTAL 8
#endif
#ifndef texenv_t
#define texenv_t
#define TEXENV_MODULATE 8448
#define TEXENV_ADD 260
#define TEXENV_REPLACE 7681
#endif
#ifndef r_FBufScale
#define r_FBufScale vec2(0.001563, 0.002083)
#endif
#define RGBM_LIGHTMAP
#line 0
uniform sampler2D u_DiffuseMap;

#if defined(USE_LIGHTMAP)
uniform sampler2D u_Lig
tMap;

uniform int u_Texture1Env;
#endif

varying vec2 var_DiffuseTex;

#if defined(USE_LIGHTMAP)
varying vec2 var_LightTex;
#endif

varying vec4 var_Color;


void main()
{
vec4 color = texture2D(u_DiffuseMap, var_DiffuseTex);
#if defined(USE_LIGHTMAP)
vec4 color2 = texture2D(u_LightMap, var_LightTex);
#if defined(RGBM_LIGHTMAP)
color2.rgb *= 32.0 * color2.a;
color2.a = 1.0;
#endif

if (u_Texture1Env == TEXENV_MODULATE)
{
color *= color2;
}
else if (u_Texture1Env == TEXENV_ADD)
{
color += color2;
}
else if (u_Texture1Env == TEXENV_REPLACE)
{
color = color2;
}
#endif

gl_FragColor = color * var_Color;
}

compile log:
Fragment shader failed to compile with the following errors:
ERROR: 0:3: '' : Declaration must include a precision qualifier or the default precision must have been previously declared.
ERROR: 0:9: '' : Declaration must include a precision qualifier or the default precision must have been previously declared.
ERROR: 0:15: '' : Declaration must include a precision qualifier or the default precision must have been previously declared.
ERROR: 0:20: '' : Declaration must include a precision qualifier or the default precision must have been previously declared.
ERROR: compilation errors. No code generated.

recursive error after: Couldn't compile shader




Link to comment

Likely is that the rend2 hasnt compiled right.....

 

After compiling it, is there anywhere else I should put the files? I see there's a search patch to Games/Openjk etc, and I've tried replacing those too with rend2 ones. Think I replaced the ones in fabulous_openjk.pk3 too. Got no errors on compile at least, so I'd think it rather had to do with the process after that.

Link to comment

It just goes into gamedata... Hold on, Xycaleth gave me his compiled version, try those and see if it works. All files into gamedata. And have the latest openJK. Dont replace anything in the openJk folder

 

Ok, this works, but there's a hitch! I deleted the My games/openJK folder prior to testing it. Worked. When I've started the game, that folder now exists again with some files. Now I can't open the game again (or vid_restart) without the same error. If I delete it again, it works. And so on...

Link to comment

Once you have the IO problems sorted, the next step is to make a better normal map. It's clear that an texture->normal map generator was used and that results in obvious ugliness. Here is what you can expect it to look like:

 

https://jkhub.org/images/xl9knzp.png

 

You'll need to render a normal map from a 3d program or convert a heightmap into a normal map the same way the door texture was done, or using a program like Xnormal. 

Boothand likes this
Link to comment

Yeah that's the next step. Might be able to make some bump files manually actually.

 

Should fs_homepath really be set to [...]/My Games/OpenJK?

That's the folder in any case that's causing me trouble, it seems. What if I'd set it to gamedata? What is it actually? :D

Link to comment

What is it actually? :D

It's where OpenJK writes its files. From Vista onward Windows finally does proper access rights and keeps normal users from changing files in the Program Files folder, where you'd install Jedi Academy (that is, the Admin would). Anything the user wants to write should go to his user directory (though people can't seem to agree on where in there exactly), which is where fs_homepath points by default, because you can't write to the folder JKA is installed to.
Link to comment

I see.

 

Using a HP laptop I bought about 5 years ago, it has windows 7 and is quite freshly formatted.

Tried rend2 just now on a healthy clean steam-install of the game, but as soon as I switch the renderer to rd-rend2, it crashes with the error.

 

Not sure if it has changed since my first error I posted, so I'll post another huge console dump. In about a week I'll be able to test on a stationary PC with different cards.

 

 

 

OpenJK-MP: v1.0.1.0 win_msvc-x86 Feb 12 2014
----- FS_Startup -----
Current search path:
C:\Users\Rune\Documents\My Games\OpenJK\base
C:\Program Files\Steam\steamapps\common\Jedi Academy\GameData\base\szico_bootland.pk3 (23 files)
C:\Program Files\Steam\steamapps\common\Jedi Academy\GameData\base\assets3.pk3 (16 files)
C:\Program Files\Steam\steamapps\common\Jedi Academy\GameData\base\assets2.pk3 (62 files)
C:\Program Files\Steam\steamapps\common\Jedi Academy\GameData\base\assets1.pk3 (8320 files)
C:\Program Files\Steam\steamapps\common\Jedi Academy\GameData\base\assets0.pk3 (15346 files)
C:\Program Files\Steam\steamapps\common\Jedi Academy\GameData\base

----------------------
23767 files in pk3 files
execing mpdefault.cfg
couldn't exec openjk.cfg
couldn't exec autoexec.cfg

------- Input Initialization -------
Skipping check for DirectInput
Joystick is not active.
------------------------------------
----- Initializing Renderer ----
Trying to load "rd-vanilla_x86.dll" from "C:\Program Files\Steam\steamapps\common\Jedi Academy\GameData"...
QKEY building random string
QKEY generated
...initializing QGL
succeeded
...setting mode 4: 800 600 W
...created window@0,0 (806x628)
Initializing OpenGL driver
...getting DC: succeeded
...GLW_ChoosePFD( 32, 24, 8 )
...65 PFDs found
...hardware acceleration found
...PIXELFORMAT 2 selected
...creating GL context: succeeded
...making context current: succeeded
Initializing OpenGL extensions
...GL_EXT_texture_compression_s3tc available
...no tc preference specified
.....using GL_EXT_texture_compression_s3tc
...using GL_EXT_texture_env_add
...GL_EXT_texture_filter_anisotropic available
...using GL_EXT_texture_filter_anisotropic
...using GL_EXT_texture_edge_clamp
...using WGL_EXT_swap_control
...using GL_ARB_multitexture
...using GL_EXT_compiled_vertex_array
...using GL_EXT_point_parameters
...GL_NV_register_combiners not found
Initializing OpenGL extensions
...GL_EXT_texture_compression_s3tc available
...no tc preference specified
.....using GL_EXT_texture_compression_s3tc
...using GL_EXT_texture_env_add
...GL_EXT_texture_filter_anisotropic available
...using GL_EXT_texture_filter_anisotropic
...using GL_EXT_texture_edge_clamp
...using WGL_EXT_swap_control
...using GL_ARB_multitexture
...using GL_EXT_compiled_vertex_array
...using GL_EXT_point_parameters
...GL_NV_register_combiners not found

GL_VENDOR: ATI Technologies Inc.
GL_RENDERER: ATI Mobility Radeon HD 4650
GL_VERSION: 2.1.8787
GL_AMDX_vertex_shader_tessellator GL_AMD_draw_buffers_blend GL_AMD_performance_monitor GL_AMD_texture_texture4 GL_ARB_color_buffer_float GL_ARB_copy_buffer GL_ARB_depth_buffer_float GL_ARB_depth_texture GL_ARB_draw_buffers GL_ARB_draw_instanced GL_ARB_fragment_program GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_framebuffer_object GL_ARB_framebuffer_sRGB GL_ARB_half_float_pixel GL_ARB_half_float_vertex GL_ARB_instanced_arrays GL_ARB_map_buffer_range GL_ARB_multisample GL_ARB_multitexture GL_ARB_occlusion_query GL_ARB_pixel_buffer_object GL_ARB_point_parameters GL_ARB_point_sprite GL_ARB_shader_objects GL_ARB_shader_texture_lod GL_ARB_shading_language_100 GL_ARB_shadow GL_ARB_shadow_ambient GL_ARB_texture_border_clamp GL_ARB_texture_buffer_object GL_ARB_texture_compression GL_ARB_texture_compression_rgtc GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_float GL_ARB_texture_mirrored_repeat GL_ARB_texture_non_power_of_two GL_ARB_texture_rectangle GL_ARB_texture_rg GL_ARB_texture_snorm GL_ARB_transpose_matrix GL_ARB_vertex_array_object GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_ARB_vertex_shader GL_ARB_window_pos GL_ATI_draw_buffers GL_ATI_envmap_bumpmap GL_ATI_fragment_shader GL_ATI_meminfo GL_ATI_separate_stencil GL_ATI_texture_compression_3dc GL_ATI_texture_env_combine3 GL_ATI_texture_float GL_ATI_texture_mirror_once GL_EXT_abgr GL_EXT_bgra GL_EXT_bindable_uniform GL_EXT_blend_color GL_EXT_blend_equation_separate GL_EXT_blend_func_separate GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_compiled_vertex_array GL_EXT_copy_buffer GL_EXT_copy_texture GL_EXT_draw_buffers2 GL_EXT_draw_instanced GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_EXT_framebuffer_object GL_EXT_framebuffer_sRGB GL_EXT_gpu_program_parameters GL_EXT_gpu_shader4 GL_EXT_multi_draw_arrays GL_EXT_packed_depth_stencil GL_EXT_packed_float GL_EXT_packed_pixels GL_EXT_pixel_buffer_object GL_EXT_point_parameters GL_EXT_provoking_vertex GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT_shadow_funcs GL_EXT_stencil_wrap GL_EXT_subtexture GL_EXT_texgen_reflection GL_EXT_texture3D GL_EXT_texture_array GL_EXT_texture_buffer_object GL_EXT_texture_compression_latc GL_EXT_texture_compression_rgtc GL_EXT_texture_compression_s3tc GL_EXT_texture_cube_map GL_EXT_texture_edge_clamp GL_EXT_texture_env_add GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_EXT_texture_filter_anisotropic GL_EXT_texture_integer GL_EXT_texture_lod GL_EXT_texture_lod_bias GL_EXT_texture_mirror_clamp GL_EXT_texture_object GL_EXT_texture_rectangle GL_EXT_texture_sRGB GL_EXT_texture_shared_exponent GL_EXT_texture_snorm GL_EXT_texture_swizzle GL_EXT_transform_feedback GL_EXT_vertex_array GL_EXT_vertex_array_bgra GL_IBM_texture_mirrored_repeat GL_KTX_buffer_region GL_NV_blend_square GL_NV_conditional_render GL_NV_copy_depth_to_color GL_NV_primitive_restart GL_NV_texgen_reflection GL_SGIS_generate_mipmap GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod GL_SUN_multi_draw_arrays GL_WIN_swap_hint WGL_EXT_swap_control
GL_MAX_TEXTURE_SIZE: 8192
GL_MAX_ACTIVE_TEXTURES_ARB: 8

PIXELFORMAT: color(32-bits) Z(24-bit) stencil(8-bits)
MODE: 4, 800 x 600 windowed hz:60
GAMMA: hardware w/ 0 overbright bits
rendering primitives: single glDrawElements
texturemode: GL_LINEAR_MIPMAP_NEAREST
picmip: 1
texture bits: 0
lightmap texture bits: 0
multitexture: enabled
compiled vertex arrays: enabled
texenv add: enabled
compressed textures: enabled
compressed lightmaps: disabled
texture compression method: GL_EXT_texture_compression_s3tc
anisotropic filtering: enabled  (16 of 16)
Dynamic Glow: disabled
-------------------------
85 shader files read 
3397 shaders found
60287 code lines
0.85 MB shader data
0.038 seconds
-------------------------

------- sound initialization -------
Initializing DirectSound
----- Sound Info -----
sound system is muted
    1 stereo
32768 samples
   16 samplebits
    1 submission_chunk
11025 speed
0x6f20050 dma buffer
No background file.
----------------------
------------------------------------

--- ambient sound initialization ---
Sound memory manager started
VM_Create: uix86.dll failed!
VM_CreateLegacy: uix86.dll succeeded
--- Common Initialization Complete ---
Winsock Initialized
Hostname: Rune-Laptop
IP: 192.168.0.189
Opening IP socket: localhost:29070

------- sound initialization -------
Initializing DirectSound
----- Sound Info -----
sound system is muted
    1 stereo
32768 samples
   16 samplebits
    1 submission_chunk
22050 speed
0x6f20050 dma buffer
No background file.

0.00MB audio data:  ( 0.00MB WAV/MP3 ) + ( 0.00MB Music )
0.00MB in sfx_t alloc data (WAV/MP3) loaded this level
----------------------
------------------------------------

--- ambient sound initialization ---
Shutting down OpenGL subsystem
----- Initializing Renderer ----
Trying to load "rd-vanilla_x86.dll" from "C:\Program Files\Steam\steamapps\common\Jedi Academy\GameData"...
...initializing QGL
succeeded
...setting mode 6: 1024 768 W
...created window@0,0 (1030x796)
Initializing OpenGL driver
...getting DC: succeeded
...GLW_ChoosePFD( 32, 24, 8 )
...65 PFDs found
...hardware acceleration found
...PIXELFORMAT 2 selected
...creating GL context: succeeded
...making context current: succeeded
Initializing OpenGL extensions
...GL_EXT_texture_compression_s3tc available
...no tc preference specified
.....using GL_EXT_texture_compression_s3tc
...using GL_EXT_texture_env_add
...GL_EXT_texture_filter_anisotropic available
...using GL_EXT_texture_filter_anisotropic
...using GL_EXT_texture_edge_clamp
...using WGL_EXT_swap_control
...using GL_ARB_multitexture
...using GL_EXT_compiled_vertex_array
...using GL_EXT_point_parameters
...GL_NV_register_combiners not found

GL_VENDOR: ATI Technologies Inc.
GL_RENDERER: ATI Mobility Radeon HD 4650
GL_VERSION: 2.1.8787
GL_AMDX_vertex_shader_tessellator GL_AMD_draw_buffers_blend GL_AMD_performance_monitor GL_AMD_texture_texture4 GL_ARB_color_buffer_float GL_ARB_copy_buffer GL_ARB_depth_buffer_float GL_ARB_depth_texture GL_ARB_draw_buffers GL_ARB_draw_instanced GL_ARB_fragment_program GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_framebuffer_object GL_ARB_framebuffer_sRGB GL_ARB_half_float_pixel GL_ARB_half_float_vertex GL_ARB_instanced_arrays GL_ARB_map_buffer_range GL_ARB_multisample GL_ARB_multitexture GL_ARB_occlusion_query GL_ARB_pixel_buffer_object GL_ARB_point_parameters GL_ARB_point_sprite GL_ARB_shader_objects GL_ARB_shader_texture_lod GL_ARB_shading_language_100 GL_ARB_shadow GL_ARB_shadow_ambient GL_ARB_texture_border_clamp GL_ARB_texture_buffer_object GL_ARB_texture_compression GL_ARB_texture_compression_rgtc GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_float GL_ARB_texture_mirrored_repeat GL_ARB_texture_non_power_of_two GL_ARB_texture_rectangle GL_ARB_texture_rg GL_ARB_texture_snorm GL_ARB_transpose_matrix GL_ARB_vertex_array_object GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_ARB_vertex_shader GL_ARB_window_pos GL_ATI_draw_buffers GL_ATI_envmap_bumpmap GL_ATI_fragment_shader GL_ATI_meminfo GL_ATI_separate_stencil GL_ATI_texture_compression_3dc GL_ATI_texture_env_combine3 GL_ATI_texture_float GL_ATI_texture_mirror_once GL_EXT_abgr GL_EXT_bgra GL_EXT_bindable_uniform GL_EXT_blend_color GL_EXT_blend_equation_separate GL_EXT_blend_func_separate GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_compiled_vertex_array GL_EXT_copy_buffer GL_EXT_copy_texture GL_EXT_draw_buffers2 GL_EXT_draw_instanced GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_EXT_framebuffer_object GL_EXT_framebuffer_sRGB GL_EXT_gpu_program_parameters GL_EXT_gpu_shader4 GL_EXT_multi_draw_arrays GL_EXT_packed_depth_stencil GL_EXT_packed_float GL_EXT_packed_pixels GL_EXT_pixel_buffer_object GL_EXT_point_parameters GL_EXT_provoking_vertex GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT_shadow_funcs GL_EXT_stencil_wrap GL_EXT_subtexture GL_EXT_texgen_reflection GL_EXT_texture3D GL_EXT_texture_array GL_EXT_texture_buffer_object GL_EXT_texture_compression_latc GL_EXT_texture_compression_rgtc GL_EXT_texture_compression_s3tc GL_EXT_texture_cube_map GL_EXT_texture_edge_clamp GL_EXT_texture_env_add GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_EXT_texture_filter_anisotropic GL_EXT_texture_integer GL_EXT_texture_lod GL_EXT_texture_lod_bias GL_EXT_texture_mirror_clamp GL_EXT_texture_object GL_EXT_texture_rectangle GL_EXT_texture_sRGB GL_EXT_texture_shared_exponent GL_EXT_texture_snorm GL_EXT_texture_swizzle GL_EXT_transform_feedback GL_EXT_vertex_array GL_EXT_vertex_array_bgra GL_IBM_texture_mirrored_repeat GL_KTX_buffer_region GL_NV_blend_square GL_NV_conditional_render GL_NV_copy_depth_to_color GL_NV_primitive_restart GL_NV_texgen_reflection GL_SGIS_generate_mipmap GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod GL_SUN_multi_draw_arrays GL_WIN_swap_hint WGL_EXT_swap_control
GL_MAX_TEXTURE_SIZE: 8192
GL_MAX_ACTIVE_TEXTURES_ARB: 8

PIXELFORMAT: color(32-bits) Z(24-bit) stencil(8-bits)
MODE: 6, 1024 x 768 windowed hz:60
GAMMA: hardware w/ 0 overbright bits
rendering primitives: single glDrawElements
texturemode: GL_LINEAR_MIPMAP_NEAREST
picmip: 1
texture bits: 0
lightmap texture bits: 0
multitexture: enabled
compiled vertex arrays: enabled
texenv add: enabled
compressed textures: enabled
compressed lightmaps: disabled
texture compression method: GL_EXT_texture_compression_s3tc
anisotropic filtering: enabled  (16 of 16)
Dynamic Glow: disabled
-------------------------
85 shader files read 
3397 shaders found
60287 code lines
0.85 MB shader data
0.039 seconds
-------------------------
VM_Create: uix86.dll failed!
VM_CreateLegacy: uix86.dll succeeded

------- sound initialization -------
Initializing DirectSound
----- Sound Info -----
sound system is muted
    1 stereo
32768 samples
   16 samplebits
    1 submission_chunk
11025 speed
0x6f20050 dma buffer
No background file.

0.00MB audio data:  ( 0.00MB WAV/MP3 ) + ( 0.00MB Music )
0.00MB in sfx_t alloc data (WAV/MP3) loaded this level
----------------------
------------------------------------

--- ambient sound initialization ---

------- sound initialization -------
Initializing DirectSound
----- Sound Info -----
sound system is muted
    1 stereo
32768 samples
   16 samplebits
    1 submission_chunk
22050 speed
0x6f20050 dma buffer
No background file.

0.00MB audio data:  ( 0.00MB WAV/MP3 ) + ( 0.00MB Music )
0.00MB in sfx_t alloc data (WAV/MP3) loaded this level
----------------------
------------------------------------

--- ambient sound initialization ---
]cl_renderer 
Cvar cl_renderer = "rd-vanilla", the default
]cl_renderer rd-rend2
cl_renderer will be changed upon restarting.
]vid_res
Unknown command "vid_res"
]vid_restart 
Shutting down OpenGL subsystem
----- Initializing Renderer ----
Trying to load "rd-rend2_x86.dll" from "C:\Program Files\Steam\steamapps\common\Jedi Academy\GameData"...
----- R_Init -----
...initializing QGL
succeeded
...setting mode 6: 1024 768 W
...created window@0,0 (1030x796)
Initializing OpenGL driver
...getting DC: succeeded
...GLW_ChoosePFD( 32, 24, 8 )
...65 PFDs found
...hardware acceleration found
...PIXELFORMAT 2 selected
...creating GL context: succeeded
...making context current: succeeded
Initializing OpenGL extensions
...GL_EXT_texture_compression_s3tc available
...no tc preference specified
.....using GL_EXT_texture_compression_s3tc
...using GL_EXT_texture_env_add
...GL_EXT_texture_filter_anisotropic available
...using GL_EXT_texture_filter_anisotropic
...using GL_EXT_texture_edge_clamp
...using WGL_EXT_swap_control
...using GL_ARB_multitexture
...using GL_EXT_compiled_vertex_array
...using GL_EXT_point_parameters
...GL_NV_register_combiners not found
...using GL_EXT_draw_range_elements
...using GL_EXT_multi_draw_arrays
...using GL_ARB_vertex_program
...using GL_ARB_vertex_buffer_object
...using GL_ARB_shader_objects
...using GL_ARB_vertex_shader
...using GLSL version 1.30
...using GL_ARB_texture_non_power_of_two
...using GL_ARB_texture_float
...using GL_ARB_half_float_pixel
...using GL_EXT_framebuffer_object
...using GL_EXT_packed_depth_stencil
...using GL_ARB_occlusion_query
...using GL_EXT_framebuffer_blit
...using GL_EXT_framebuffer_multisample
...ignoring GL_EXT_texture_sRGB
...ignoring GL_EXT_framebuffer_sRGB
...GL_EXT_texture_sRGB_decode not found
...using GL_EXT_texture_compression_latc
...GL_ARB_texture_compression_bptc not found
...using GL_ARB_draw_buffers
...GL_ARB_depth_clamp not found
...GL_ARB_seamless_cube_map not found
...GL_ARB_vertex_type_2_10_10_10_rev not found
------- FBO_Init -------
------- GLSL_InitGPUShaders -------
#version 130
#define varying in
out vec4 out_Color;
#define gl_FragColor out_Color
#ifndef M_PI
#define M_PI 3.14159265358979323846f
#endif
#ifndef deformGen_t
#define deformGen_t
#define DGEN_WAVE_SIN 1
#define DGEN_WAVE_SQUARE 2
#define DGEN_WAVE_TRIANGLE 3
#define DGEN_WAVE_SAWTOOTH 4
#define DGEN_WAVE_INVERSE_SAWTOOTH 5
#define DGEN_BULGE 7
#define DGEN_MOVE 8
#endif
#ifndef tcGen_t
#define tcGen_t
#define TCGEN_LIGHTMAP 2
#define TCGEN_LIGHTMAP1 3
#define TCGEN_LIGHTMAP2 4
#define TCGEN_LIGHTMAP3 5
#define TCGEN_TEXTURE 6
#define TCGEN_ENVIRONMENT_MAPPED 7
#define TCGEN_FOG 8
#define TCGEN_VECTOR 9
#endif
#ifndef colorGen_t
#define colorGen_t
#define CGEN_LIGHTING_DIFFUSE 11
#endif
#ifndef alphaGen_t
#define alphaGen_t
#define AGEN_LIGHTING_SPECULAR 6
#define AGEN_PORTAL 8
#endif
#ifndef texenv_t
#define texenv_t
#define TEXENV_MODULATE 8448
#define TEXENV_ADD 260
#define TEXENV_REPLACE 7681
#endif
#ifndef r_FBufScale
#define r_FBufScale vec2(0.000977, 0.001302)
#endif
#define RGBM_LIGHTMAP
#line 0
unif
rm sampler2D u_DiffuseMap;
#if defined(USE_LIGHTMAP)
uniform sampler2D u_LightMap;
uniform int       u_Texture1Env;
#endif
varying vec2      var_DiffuseTex;
#if defined(USE_LIGHTMAP)
varying vec2      var_LightTex;
#endif
varying vec4      var_Color;
void main()
{
	vec4 color  = texture2D(u_DiffuseMap, var_DiffuseTex);
#if defined(USE_LIGHTMAP)
	vec4 color2 = texture2D(u_LightMap, var_LightTex);
  #if defined(RGBM_LIGHTMAP)
	color2.rgb *= color2.a;
	color2.a = 1.0;
  #endif
	if (u_Texture1Env == TEXENV_MODULATE)
	{
		color *= color2;
	}
	else if (u_Texture1Env == TEXENV_ADD)
	{
		color += color2;
	}
	else if (u_Texture1Env == TEXENV_REPLACE)
	{
		color = color2;
	}
	
	//color = color * (u_Texture1Env.xxxx + color2 * u_Texture1Env.z) + color2 * u_Texture1Env.y;
#endif
	gl_FragColor = color * var_Color;
}

compile log:
Fragment shader failed to compile with the following errors:
ERROR: 0:3: '' : Declaration must include a precision qualifier or the default precision must have been previously declared. 
ERROR: 0:6: '' : Declaration must include a precision qualifier or the default precision must have been previously declared. 
ERROR: 0:10: '' : Declaration must include a precision qualifier or the default precision must have been previously declared. 
ERROR: 0:13: '' : Declaration must include a precision qualifier or the default precision must have been previously declared. 
ERROR:  compilation errors.  No code generated.

*******************
ERROR: Couldn't compile shader
********************
RE_Shutdown( 0 )
----- R_Init -----
------- FBO_Init -------
------- GLSL_InitGPUShaders -------
#version 130
#define varying in
out vec4 out_Color;
#define gl_FragColor out_Color
#ifndef M_PI
#define M_PI 3.14159265358979323846f
#endif
#ifndef deformGen_t
#define deformGen_t
#define DGEN_WAVE_SIN 1
#define DGEN_WAVE_SQUARE 2
#define DGEN_WAVE_TRIANGLE 3
#define DGEN_WAVE_SAWTOOTH 4
#define DGEN_WAVE_INVERSE_SAWTOOTH 5
#define DGEN_BULGE 7
#define DGEN_MOVE 8
#endif
#ifndef tcGen_t
#define tcGen_t
#define TCGEN_LIGHTMAP 2
#define TCGEN_LIGHTMAP1 3
#define TCGEN_LIGHTMAP2 4
#define TCGEN_LIGHTMAP3 5
#define TCGEN_TEXTURE 6
#define TCGEN_ENVIRONMENT_MAPPED 7
#define TCGEN_FOG 8
#define TCGEN_VECTOR 9
#endif
#ifndef colorGen_t
#define colorGen_t
#define CGEN_LIGHTING_DIFFUSE 11
#endif
#ifndef alphaGen_t
#define alphaGen_t
#define AGEN_LIGHTING_SPECULAR 6
#define AGEN_PORTAL 8
#endif
#ifndef texenv_t
#define texenv_t
#define TEXENV_MODULATE 8448
#define TEXENV_ADD 260
#define TEXENV_REPLACE 7681
#endif
#ifndef r_FBufScale
#define r_FBufScale vec2(0.000977, 0.001302)
#endif
#define RGBM_LIGHTMAP
#line 0
unif
rm sampler2D u_DiffuseMap;
#if defined(USE_LIGHTMAP)
uniform sampler2D u_LightMap;
uniform int       u_Texture1Env;
#endif
varying vec2      var_DiffuseTex;
#if defined(USE_LIGHTMAP)
varying vec2      var_LightTex;
#endif
varying vec4      var_Color;
void main()
{
	vec4 color  = texture2D(u_DiffuseMap, var_DiffuseTex);
#if defined(USE_LIGHTMAP)
	vec4 color2 = texture2D(u_LightMap, var_LightTex);
  #if defined(RGBM_LIGHTMAP)
	color2.rgb *= color2.a;
	color2.a = 1.0;
  #endif
	if (u_Texture1Env == TEXENV_MODULATE)
	{
		color *= color2;
	}
	else if (u_Texture1Env == TEXENV_ADD)
	{
		color += color2;
	}
	else if (u_Texture1Env == TEXENV_REPLACE)
	{
		color = color2;
	}
	
	//color = color * (u_Texture1Env.xxxx + color2 * u_Texture1Env.z) + color2 * u_Texture1Env.y;
#endif
	gl_FragColor = color * var_Color;
}

compile log:
Fragment shader failed to compile with the following errors:
ERROR: 0:3: '' : Declaration must include a precision qualifier or the default precision must have been previously declared. 
ERROR: 0:6: '' : Declaration must include a precision qualifier or the default precision must have been previously declared. 
ERROR: 0:10: '' : Declaration must include a precision qualifier or the default precision must have been previously declared. 
ERROR: 0:13: '' : Declaration must include a precision qualifier or the default precision must have been previously declared. 
ERROR:  compilation errors.  No code generated.

recursive error after: Couldn't compile shader
 

 

 

Link to comment

1) Get OpenJk latest build from their buildbot links --> Unzip it to gamedata/

2) Add the rend2.dll that I sent you to gamedata

3) Run openjk.x86.exe with clean base and patch 1.01 (to start with)

4) Load a default map (I.E HAVE NO CUSTOM FILES IN BASE INCLUDING .mtr

5) cl_renderer rd-rend2

6) vid_restart

 

Any luck?

 

(Also, youre on windows right?)

Link to comment

1) Get OpenJk latest build from their buildbot links --> Unzip it to gamedata/

2) Add the rend2.dll that I sent you to gamedata

3) Run openjk.x86.exe with clean base and patch 1.01 (to start with)

4) Load a default map (I.E HAVE NO CUSTOM FILES IN BASE INCLUDING .mtr

5) cl_renderer rd-rend2

6) vid_restart

 

Any luck?

 

(Also, youre on windows right?)

 

For the cleanliness tests, I usually use the steam version, it comes already patched.

 

Didn't wanna bother with technicalities with screen capture, so here you go:

 

 

 

@@mrwonko

 

Dxdiag:

 

 

 

dxdiag.png

 

dxdiag2.png

 

 

Link to comment

And the completely clean base folder?

 

It only had default assets (per 1.01) as far as I can tell. What did you have in mind?

 

 

Hmm, I'd have to know exactly which :D I've become a sissy-girl when it comes to graphics- and sound drivers after past experimentation. I feel like choosing the wrong driver leaves wounds on my computer that never heal.

Link to comment

Okay. Found the correct one now. I'd say it's about 50% chance it was installed correctly. It calls itself AMD catalyst install manager, doesn't pretend to be a *program*, it just installed, then did nothing. I decided to restart my computer for good measure, computer froze on startup (loaded forever), then forced it to restart, unplugged devices connected, started windows. I seem to remember I used to have access to some Catalyst control center back in the days, right clicking on the desktop. It's not showing up now, but it's installed under Programs.

 

Either way, the issue with rend2 persists.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...