Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Everything rendered in black #1

Closed
typewriter1 opened this issue Apr 22, 2019 · 9 comments
Closed

Everything rendered in black #1

typewriter1 opened this issue Apr 22, 2019 · 9 comments

Comments

@typewriter1
Copy link

When running, whether I use sublime, mediocre or terrible quality, the game shows up only how it does in this screenshot:
black_rendering

Apart from this, it appears to be an excellent game though, with good graphics (at least from what I can tell from the screenshots). I am using Windows 10 with an Intel HD Graphics 630 GPU, which should theoretically support up to OpenGL 4.5.

@rdb
Copy link
Owner

rdb commented Apr 22, 2019

I think this has to do with a certain color shader input not working correctly on this specific GPU series. Oddly, I've not been able to produce it on my own Intel HD Graphics 620 on Windows 10, but I have seen it with an identical GPU on a different machine.

I suspect a driver bug, but maybe we can find an adequate workaround.

@typewriter1
Copy link
Author

Might this also be the cause of this issue I am experiencing with RenderPipline?

@rdb
Copy link
Owner

rdb commented Apr 23, 2019

Might be. Impossible to tell for sure without further debugging.

@rdb
Copy link
Owner

rdb commented Apr 24, 2019

@typewriter1 If you have time, could you maybe do the following?

  1. Attach the output running with notify-level-glgsg debug
  2. Record an apitrace file and attach it
    In both cases it's only needed to run it long enough to reproduce the black output, in order not to create an unnecessarily long file.

I have a few ideas in the back of my head of what might be causing this, and these two bits of information might help me confirm it.

@typewriter1
Copy link
Author

Output with notify-level-gsg debug:

Known pipe types:
  wglGraphicsPipe
(all display modules loaded.)
:display:gsg:glgsg(debug): HAS EXT WGL_ARB_pixel_format 1
:display:gsg:glgsg(debug): HAS EXT WGL_ARB_multisample 1
:display:gsg:glgsg(debug): HAS EXT WGL_ARB_create_context 1
:display:gsg:glgsg(debug): GL_VENDOR = Intel
:display:gsg:glgsg(debug): GL_RENDERER = Intel(R) HD Graphics 630
:display:gsg:glgsg(debug): GL_VERSION = 3.2.0 - Build 24.20.100.6344
:display:gsg:glgsg(debug): Detected OpenGL version: 3.2
:display:gsg:glgsg(debug): GL_SHADING_LANGUAGE_VERSION = 1.50 - Build 24.20.100.6344
:display:gsg:glgsg(debug): Detected GLSL version: 1.50
:display:gsg:glgsg(debug): HAS EXT GL_ARB_compatibility 0
:display:gsg:glgsg(debug): Using core profile
:display:gsg:glgsg(debug): GL Extensions:
  GL_3DFX_texture_compression_FXT1       GL_AMD_depth_clamp_separate
  GL_AMD_vertex_shader_layer             GL_AMD_vertex_shader_viewport_index
  GL_ARB_ES2_compatibility               GL_ARB_ES3_1_compatibility
  GL_ARB_ES3_compatibility               GL_ARB_arrays_of_arrays
  GL_ARB_base_instance                   GL_ARB_bindless_texture
  GL_ARB_blend_func_extended             GL_ARB_buffer_storage
  GL_ARB_cl_event                        GL_ARB_clear_buffer_object
  GL_ARB_clear_texture                   GL_ARB_clip_control
  GL_ARB_color_buffer_float              GL_ARB_compressed_texture_pixel_storage
  GL_ARB_compute_shader                  GL_ARB_conditional_render_inverted
  GL_ARB_conservative_depth              GL_ARB_copy_buffer
  GL_ARB_copy_image                      GL_ARB_cull_distance
  GL_ARB_debug_output                    GL_ARB_depth_buffer_float
  GL_ARB_depth_clamp                     GL_ARB_depth_texture
  GL_ARB_derivative_control              GL_ARB_direct_state_access
  GL_ARB_draw_buffers                    GL_ARB_draw_buffers_blend
  GL_ARB_draw_elements_base_vertex       GL_ARB_draw_indirect
  GL_ARB_draw_instanced                  GL_ARB_enhanced_layouts
  GL_ARB_explicit_attrib_location        GL_ARB_explicit_uniform_location
  GL_ARB_fragment_coord_conventions      GL_ARB_fragment_layer_viewport
  GL_ARB_fragment_program                GL_ARB_fragment_program_shadow
  GL_ARB_fragment_shader                 GL_ARB_fragment_shader_interlock
  GL_ARB_framebuffer_no_attachments      GL_ARB_framebuffer_object
  GL_ARB_framebuffer_sRGB                GL_ARB_geometry_shader4
  GL_ARB_get_program_binary              GL_ARB_get_texture_sub_image
  GL_ARB_gpu_shader5                     GL_ARB_gpu_shader_fp64
  GL_ARB_half_float_pixel                GL_ARB_half_float_vertex
  GL_ARB_indirect_parameters             GL_ARB_instanced_arrays
  GL_ARB_internalformat_query            GL_ARB_internalformat_query2
  GL_ARB_invalidate_subdata              GL_ARB_map_buffer_alignment
  GL_ARB_map_buffer_range                GL_ARB_multi_bind
  GL_ARB_multi_draw_indirect             GL_ARB_multisample
  GL_ARB_multitexture                    GL_ARB_occlusion_query
  GL_ARB_occlusion_query2                GL_ARB_pixel_buffer_object
  GL_ARB_point_parameters                GL_ARB_point_sprite
  GL_ARB_polygon_offset_clamp            GL_ARB_post_depth_coverage
  GL_ARB_program_interface_query         GL_ARB_provoking_vertex
  GL_ARB_query_buffer_object             GL_ARB_robust_buffer_access_behavior
  GL_ARB_robustness                      GL_ARB_robustness_isolation
  GL_ARB_sample_shading                  GL_ARB_sampler_objects
  GL_ARB_seamless_cube_map               GL_ARB_seamless_cubemap_per_texture
  GL_ARB_separate_shader_objects         GL_ARB_shader_atomic_counter_ops
  GL_ARB_shader_atomic_counters          GL_ARB_shader_bit_encoding
  GL_ARB_shader_draw_parameters          GL_ARB_shader_group_vote
  GL_ARB_shader_image_load_store         GL_ARB_shader_image_size
  GL_ARB_shader_objects                  GL_ARB_shader_precision
  GL_ARB_shader_stencil_export           GL_ARB_shader_storage_buffer_object
  GL_ARB_shader_subroutine               GL_ARB_shader_texture_image_samples
  GL_ARB_shading_language_100            GL_ARB_shading_language_420pack
  GL_ARB_shading_language_packing        GL_ARB_shadow
  GL_ARB_stencil_texturing               GL_ARB_sync
  GL_ARB_tessellation_shader             GL_ARB_texture_barrier
  GL_ARB_texture_border_clamp            GL_ARB_texture_buffer_object
  GL_ARB_texture_buffer_object_rgb32     GL_ARB_texture_buffer_range
  GL_ARB_texture_compression             GL_ARB_texture_compression_bptc
  GL_ARB_texture_compression_rgtc        GL_ARB_texture_cube_map
  GL_ARB_texture_cube_map_array          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_gather                  GL_ARB_texture_mirror_clamp_to_edge
  GL_ARB_texture_mirrored_repeat         GL_ARB_texture_multisample
  GL_ARB_texture_non_power_of_two        GL_ARB_texture_query_levels
  GL_ARB_texture_query_lod               GL_ARB_texture_rectangle
  GL_ARB_texture_rg                      GL_ARB_texture_rgb10_a2ui
  GL_ARB_texture_stencil8                GL_ARB_texture_storage
  GL_ARB_texture_storage_multisample     GL_ARB_texture_swizzle
  GL_ARB_texture_view                    GL_ARB_timer_query
  GL_ARB_transform_feedback2             GL_ARB_transform_feedback3
  GL_ARB_transform_feedback_instanced    GL_ARB_transpose_matrix
  GL_ARB_uniform_buffer_object           GL_ARB_vertex_array_bgra
  GL_ARB_vertex_array_object             GL_ARB_vertex_attrib_64bit
  GL_ARB_vertex_attrib_binding           GL_ARB_vertex_buffer_object
  GL_ARB_vertex_program                  GL_ARB_vertex_shader
  GL_ARB_vertex_type_10f_11f_11f_rev     GL_ARB_vertex_type_2_10_10_10_rev
  GL_ARB_viewport_array                  GL_ARB_window_pos
  GL_ATI_separate_stencil                GL_EXT_abgr
  GL_EXT_bgra                            GL_EXT_blend_color
  GL_EXT_blend_equation_separate         GL_EXT_blend_func_separate
  GL_EXT_blend_minmax                    GL_EXT_blend_subtract
  GL_EXT_clip_volume_hint                GL_EXT_compiled_vertex_array
  GL_EXT_direct_state_access             GL_EXT_draw_buffers2
  GL_EXT_draw_range_elements             GL_EXT_fog_coord
  GL_EXT_framebuffer_blit                GL_EXT_framebuffer_multisample
  GL_EXT_framebuffer_object              GL_EXT_geometry_shader4
  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_polygon_offset_clamp            GL_EXT_rescale_normal
  GL_EXT_secondary_color                 GL_EXT_separate_specular_color
  GL_EXT_shader_framebuffer_fetch        GL_EXT_shader_integer_mix
  GL_EXT_shadow_funcs                    GL_EXT_stencil_two_side
  GL_EXT_stencil_wrap                    GL_EXT_texture3D
  GL_EXT_texture_array                   GL_EXT_texture_compression_s3tc
  GL_EXT_texture_edge_clamp              GL_EXT_texture_env_add
  GL_EXT_texture_env_combine             GL_EXT_texture_filter_anisotropic
  GL_EXT_texture_integer                 GL_EXT_texture_lod_bias
  GL_EXT_texture_rectangle               GL_EXT_texture_sRGB
  GL_EXT_texture_sRGB_decode             GL_EXT_texture_shared_exponent
  GL_EXT_texture_snorm                   GL_EXT_texture_storage
  GL_EXT_texture_swizzle                 GL_EXT_timer_query
  GL_EXT_transform_feedback              GL_IBM_texture_mirrored_repeat
  GL_INTEL_conservative_rasterization    GL_INTEL_fragment_shader_ordering
  GL_INTEL_framebuffer_CMAA              GL_INTEL_map_texture
  GL_INTEL_multi_rate_fragment_shader    GL_INTEL_performance_query
  GL_KHR_blend_equation_advanced         GL_KHR_blend_equation_advanced_coherent
  GL_KHR_context_flush_control           GL_KHR_debug
  GL_KHR_texture_compression_astc_hdr    GL_KHR_texture_compression_astc_ldr
  GL_NV_blend_square                     GL_NV_conditional_render
  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_ARB_buffer_region
  WGL_ARB_context_flush_control          WGL_ARB_create_context
  WGL_ARB_create_context_profile         WGL_ARB_create_context_robustness
  WGL_ARB_extensions_string              WGL_ARB_framebuffer_sRGB
  WGL_ARB_make_current_read              WGL_ARB_multisample
  WGL_ARB_pbuffer                        WGL_ARB_pixel_format
  WGL_ARB_pixel_format_float             WGL_EXT_create_context_es2_profile
  WGL_EXT_create_context_es_profile      WGL_EXT_depth_float
  WGL_EXT_extensions_string              WGL_EXT_pixel_format_packed_float
  WGL_EXT_swap_control                   WGL_NV_DX_interop
  WGL_NV_DX_interop2                     WGL_WGL_INTEL_cl_sharing
:display:gsg:glgsg(debug): HAS EXT GL_EXT_debug_marker 0
:display:gsg:glgsg(debug): HAS EXT GL_KHR_debug 1
:display:gsg:glgsg(debug): gl-debug supported, but NOT enabled.
:display:gsg:glgsg(debug): HAS EXT GL_ARB_ES3_compatibility 1
:display:gsg:glgsg(debug): HAS EXT GL_EXT_secondary_color 1
:display:gsg:glgsg(debug): HAS EXT GL_ARB_texture_storage 1
:display:gsg:glgsg(debug): HAS EXT GL_ARB_clear_texture 1
:display:gsg:glgsg(debug): HAS EXT GL_ARB_clear_buffer_object 1
:display:gsg:glgsg(debug): HAS EXT GL_ARB_texture_cube_map_array 1
:display:gsg:glgsg(debug): HAS EXT GL_ARB_vertex_type_10f_11f_11f_rev 1
:display:gsg:glgsg(debug): HAS EXT GL_ARB_buffer_storage 1
:display:gsg:glgsg(debug): HAS EXT GL_ARB_tessellation_shader 1
:display:gsg:glgsg(debug): HAS EXT GL_ARB_vertex_program 1
:display:gsg:glgsg(debug): HAS EXT GL_ARB_fragment_program 1
:display:gsg:glgsg(debug): HAS EXT GL_NV_gpu_program5 0
:display:gsg:glgsg(debug): HAS EXT GL_NV_gpu_program4 0
:display:gsg:glgsg(debug): HAS EXT GL_NV_vertex_program3 0
:display:gsg:glgsg(debug): HAS EXT GL_NV_vertex_program2 0
:display:gsg:glgsg(debug): HAS EXT GL_NV_vertex_program1_1 0
:display:gsg:glgsg(debug): HAS EXT GL_ARB_compute_shader 1
:display:gsg:glgsg(debug): HAS EXT GL_ARB_vertex_attrib_64bit 1
:display:gsg:glgsg(debug): HAS EXT GL_ARB_vertex_attrib_binding 1
:display:gsg:glgsg(debug): HAS EXT ARB_shader_storage_buffer_object 0
:display:gsg:glgsg(debug): HAS EXT GL_ARB_instanced_arrays 1
:display:gsg:glgsg(debug): HAS EXT GL_ARB_draw_indirect 1
:display:gsg:glgsg(debug): HAS EXT GL_ARB_direct_state_access 1
:display:gsg:glgsg(debug): HAS EXT GL_ARB_framebuffer_no_attachments 1
:display:gsg:glgsg(debug): HAS EXT GL_NV_framebuffer_multisample_coverage 0
:display:gsg:glgsg(debug): HAS EXT GL_ARB_viewport_array 1
:display:gsg:glgsg(debug): Occlusion query counter provides 64 bits.
:display:gsg:glgsg(debug): HAS EXT GL_ARB_timer_query 1
:display:gsg:glgsg(debug): HAS EXT GL_ARB_blend_func_extended 1
:display:gsg:glgsg(debug): HAS EXT GL_EXT_texture_mirror_clamp 0
:display:gsg:glgsg(debug): HAS EXT GL_ARB_texture_mirror_clamp_to_edge 1
:display:gsg:glgsg(debug): max texture dimension = 16384, max 3d texture = 2048, max 2d texture array = 2048, max cube map = 16384
:display:gsg:glgsg(debug): max_elements_vertices = 1048576, max_elements_indices = 1048576
:display:gsg:glgsg(debug): vertex buffer objects are supported.
:display:gsg:glgsg(debug): Supported compressed texture formats:
  GL_COMPRESSED_RGB_S3TC_DXT1_EXT
  GL_COMPRESSED_RGBA_S3TC_DXT3_EXT
  GL_COMPRESSED_RGBA_S3TC_DXT5_EXT
  GL_COMPRESSED_RGBA_S3TC_DXT1_EXT
  GL_COMPRESSED_RGB_FXT1_3DFX
  GL_COMPRESSED_RGBA_FXT1_3DFX
  GL_COMPRESSED_RGBA_BPTC_UNORM
  GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM
  GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT
  GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT
  GL_COMPRESSED_R11_EAC
  GL_COMPRESSED_RG11_EAC
  GL_COMPRESSED_SIGNED_R11_EAC
  GL_COMPRESSED_SIGNED_RG11_EAC
  GL_COMPRESSED_RGB8_ETC2
  GL_COMPRESSED_SRGB8_ETC2
  GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2
  GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2
  GL_COMPRESSED_RGBA8_ETC2_EAC
  GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC
  GL_COMPRESSED_RGBA_ASTC_4x4_KHR
  GL_COMPRESSED_RGBA_ASTC_5x4_KHR
  GL_COMPRESSED_RGBA_ASTC_5x5_KHR
  GL_COMPRESSED_RGBA_ASTC_6x5_KHR
  GL_COMPRESSED_RGBA_ASTC_6x6_KHR
  GL_COMPRESSED_RGBA_ASTC_8x5_KHR
  GL_COMPRESSED_RGBA_ASTC_8x6_KHR
  GL_COMPRESSED_RGBA_ASTC_8x8_KHR
  GL_COMPRESSED_RGBA_ASTC_10x5_KHR
  GL_COMPRESSED_RGBA_ASTC_10x6_KHR
  GL_COMPRESSED_RGBA_ASTC_10x8_KHR
  GL_COMPRESSED_RGBA_ASTC_10x10_KHR
  GL_COMPRESSED_RGBA_ASTC_12x10_KHR
  GL_COMPRESSED_RGBA_ASTC_12x12_KHR
  GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR
  GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR
  GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR
  GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR
  GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR
  GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR
  GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR
  GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR
  GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR
  GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR
  GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR
  GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR
  GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR
  GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR
:display:gsg:glgsg(debug): HAS EXT GL_EXT_texture_filter_anisotropic 1
:display:gsg:glgsg(debug): HAS EXT GL_ARB_shader_image_load_store 1
:display:gsg:glgsg(debug): HAS EXT GL_ARB_sampler_objects 1
:display:gsg:glgsg(debug): HAS EXT GL_ARB_multi_bind 1
:display:gsg:glgsg(debug): HAS EXT GL_ARB_internalformat_query2 1
:display:gsg:glgsg(debug): HAS EXT GL_ARB_bindless_texture 1
:display:gsg:glgsg(debug): HAS EXT GL_ARB_get_program_binary 1
:display:gsg:glgsg(debug): HAS EXT GL_EXT_stencil_two_side 1
:display:gsg:glgsg(debug): Supported program binary formats:
:display:gsg:glgsg(debug):   0x0001
:display:gsg:glgsg(debug): HAS EXT GL_NV_gpu_program5 0
:display:gsg:glgsg(debug): HAS EXT GL_NV_gpu_program4 0
:display:gsg:glgsg(debug): HAS EXT GL_NV_fragment_program2 0
:display:gsg:glgsg(debug): HAS EXT GL_NV_fragment_program 0
:display:gsg:glgsg(debug): Supported Cg profiles:
:display:gsg:glgsg(debug): Cg GLSL version = CG_GL_GLSL_DEFAULT
:display:gsg:glgsg(debug): Cg latest vertex profile = unknown
:display:gsg:glgsg(debug): Cg latest fragment profile = unknown
:display:gsg:glgsg(debug): Cg latest geometry profile = unknown
:display:gsg:glgsg(debug): basic-shaders-only #f
:display:gsg:glgsg(debug): Cg active vertex profile = glslv
:display:gsg:glgsg(debug): Cg active fragment profile = glslf
:display:gsg:glgsg(debug): Cg active geometry profile = glslg
:display:gsg:glgsg(debug): shader model = 2.0
:display:gsg:glgsg(debug): HAS EXT WGL_EXT_swap_control 1
:display:gsg:glgsg(debug): HAS EXT WGL_ARB_pbuffer 1
:display:gsg:glgsg(debug): HAS EXT WGL_ARB_pixel_format 1
:display:gsg:glgsg(debug): HAS EXT WGL_ARB_multisample 1
:display:gsg:glgsg(debug): HAS EXT WGL_ARB_render_texture 0
:display:gsg:glgsg(error): GL error 0x500 : invalid enumerant
:display:gsg:glgsg(error): An OpenGL error has occurred.  Set gl-debug #t in your PRC file to display more information.
:display:gsg:glgsg(debug): HAS EXT GL_ARB_compatibility 0
OpenGL version: 3.2 (core)
:display:gsg:glgsg(debug): Compiling GLSL vertex shader created-shader
:display:gsg:glgsg(debug): Compiling GLSL fragment shader created-shader
:display:gsg:glgsg(debug): Linking GLSL shader created-shader
:display:gsg:glgsg(debug): Active attribute p3d_Color with size 1 and type 0x8b52 is bound to location 3
:display:gsg:glgsg(debug): Active attribute p3d_MultiTexCoord0 with size 1 and type 0x8b50 is bound to location 1
:display:gsg:glgsg(debug): Active attribute p3d_Vertex with size 1 and type 0x8b52 is bound to location 0
:display:gsg:glgsg(debug): Active uniform p3d_ColorScale with size 1 and type 0x8b52 is bound to location 1
:display:gsg:glgsg(debug): Active uniform p3d_ModelViewProjectionMatrix with size 1 and type 0x8b5c is bound to location 0
:display:gsg:glgsg(debug): Active uniform p3d_TexAlphaOnly with size 1 and type 0x8b52 is bound to location 3
:display:gsg:glgsg(debug): Active uniform p3d_Texture0 with size 1 and type 0x8b5e is bound to location 2
:display:gsg:glgsg(debug): loading uncompressed texture _0
:display:gsg:glgsg(debug): loading new texture object for _0, 256 x 256 x 1, z = 0, mipmaps 1, uses_mipmaps = 0
:display:gsg:glgsg(debug): loading uncompressed texture _0
:display:gsg:glgsg(debug): loading new texture object for _0, 256 x 256 x 1, z = 0, mipmaps 1, uses_mipmaps = 0
Loading saves from C:\Users\avise\Desktop\Games\hexima-master\save.json
Playing menu
:display:gsg:glgsg(debug): Creating depth stencil renderbuffer.
:display:gsg:glgsg(debug): Binding texture  to color attachment.
:display:gsg:glgsg(debug): loading texture with NULL image
:display:gsg:glgsg(debug): loading new texture object for , 1020 x 764 x 1, z = 0, mipmaps 0, uses_mipmaps = 0
:display:gsg:glgsg(debug):   (initializing NULL image)
:display:gsg:glgsg(debug): Binding texture  to color attachment.
:display:gsg:glgsg(debug): loading texture with NULL image
:display:gsg:glgsg(debug): loading new texture object for , 1020 x 764 x 1, z = 0, mipmaps 0, uses_mipmaps = 0
:display:gsg:glgsg(debug):   (initializing NULL image)
:display:gsg:glgsg(debug): Binding texture  to color attachment.
:display:gsg:glgsg(debug): loading texture with NULL image
:display:gsg:glgsg(debug): loading new texture object for , 1020 x 764 x 1, z = 0, mipmaps 0, uses_mipmaps = 0
:display:gsg:glgsg(debug):   (initializing NULL image)
:display:gsg:glgsg(debug): Binding texture  to color attachment.
:display:gsg:glgsg(debug): loading texture with NULL image
:display:gsg:glgsg(debug): loading new texture object for , 1020 x 764 x 1, z = 0, mipmaps 0, uses_mipmaps = 0
:display:gsg:glgsg(debug):   (initializing NULL image)
:display:gsg:glgsg(debug): Creating depth stencil renderbuffer.
:display:gsg:glgsg(debug): Binding texture  to color attachment.
:display:gsg:glgsg(debug): loading uncompressed texture blurred_ft
:display:gsg:glgsg(debug): loading new texture object for blurred_ft, 64 x 64 x 1, z = 0, mipmaps 1, uses_mipmaps = 0
:display:gsg:glgsg(debug): loading uncompressed texture blurred_lf
:display:gsg:glgsg(debug): loading new texture object for blurred_lf, 64 x 64 x 1, z = 0, mipmaps 1, uses_mipmaps = 0
:display:gsg:glgsg(debug): loading uncompressed texture blurred_bk
:display:gsg:glgsg(debug): loading new texture object for blurred_bk, 64 x 64 x 1, z = 0, mipmaps 1, uses_mipmaps = 0
:display:gsg:glgsg(debug): loading uncompressed texture blurred_rt
:display:gsg:glgsg(debug): loading new texture object for blurred_rt, 64 x 64 x 1, z = 0, mipmaps 1, uses_mipmaps = 0
:display:gsg:glgsg(debug): loading uncompressed texture blurred_dn
:display:gsg:glgsg(debug): loading new texture object for blurred_dn, 64 x 64 x 1, z = 0, mipmaps 1, uses_mipmaps = 0
:display:gsg:glgsg(debug): loading uncompressed texture blurred_up
:display:gsg:glgsg(debug): loading new texture object for blurred_up, 64 x 64 x 1, z = 0, mipmaps 1, uses_mipmaps = 0
:display:gsg:glgsg(debug): Compiling GLSL vertex shader assets/shader/lighting.vert
:display:gsg:glgsg(debug): Compiling GLSL fragment shader assets/shader/lighting.frag
:display:gsg:glgsg(debug): Linking GLSL shader assets/shader/lighting.frag
:display:gsg:glgsg(debug): Active attribute normal with size 1 and type 0x8b51 is bound to location 1
:display:gsg:glgsg(debug): Active attribute p3d_Color with size 1 and type 0x8b51 is bound to location 3
:display:gsg:glgsg(debug): Active attribute p3d_MultiTexCoord0 with size 1 and type 0x8b50 is bound to location 2
:display:gsg:glgsg(debug): Active attribute vertex with size 1 and type 0x8b52 is bound to location 0
:display:gsg:glgsg(debug): Active uniform p3d_LightSource[0].position with size 1 and type 0x8b52 is bound to location 3
:display:gsg:glgsg(debug): Active uniform p3d_LightSource[0].color with size 1 and type 0x8b51 is bound to location 4
:display:gsg:glgsg(debug): Active uniform p3d_LightSource[0].shadowMap with size 1 and type 0x8b62 is bound to location 9
:display:gsg:glgsg(debug): Active uniform p3d_LightSource[0].shadowViewMatrix with size 1 and type 0x8b5c is bound to location 10
:display:gsg:glgsg(debug): Active uniform p3d_ModelViewMatrix with size 1 and type 0x8b5c is bound to location 1
:display:gsg:glgsg(debug): Active uniform p3d_ModelViewProjectionMatrix with size 1 and type 0x8b5c is bound to location 0
:display:gsg:glgsg(debug): Active uniform p3d_NormalMatrix with size 1 and type 0x8b5b is bound to location 2
:display:gsg:glgsg(debug): Active uniform p3d_ColorScale with size 1 and type 0x8b52 is bound to location 18
:display:gsg:glgsg(debug): Active uniform p3d_LightModel.ambient with size 1 and type 0x8b52 is bound to location 11
:display:gsg:glgsg(debug): Active uniform p3d_TexAlphaOnly with size 1 and type 0x8b52 is bound to location 17
:display:gsg:glgsg(debug): Active uniform p3d_Texture0 with size 1 and type 0x8b5e is bound to location 16
:display:gsg:glgsg(debug): loading texture with NULL image sun
:display:gsg:glgsg(debug): loading new texture object for sun, 1024 x 2048 x 1, z = 0, mipmaps 0, uses_mipmaps = 0
:display:gsg:glgsg(debug):   (initializing NULL image)
:display:gsg:glgsg(debug): Binding texture  to color attachment.
:display:gsg:glgsg(debug): Compiling GLSL vertex shader shader/blur.vert
:display:gsg:glgsg(debug): Compiling GLSL fragment shader shader/blur.frag
:display:gsg:glgsg(debug): Linking GLSL shader shader/blur.frag
:display:gsg:glgsg(debug): Active attribute p3d_Vertex with size 1 and type 0x8b52 is bound to location 0
:display:gsg:glgsg(debug): Active uniform p3d_ModelViewProjectionMatrix with size 1 and type 0x8b5c is bound to location 0
:display:gsg:glgsg(debug): Active uniform direction with size 1 and type 0x8b50 is bound to location 2
:display:gsg:glgsg(debug): Active uniform image with size 1 and type 0x8b5e is bound to location 1
:display:gsg:glgsg(debug): Active uniform p3d_ColorScale with size 1 and type 0x8b52 is bound to location 4
:display:gsg:glgsg(debug): Active uniform scale with size 1 and type 0x1406 is bound to location 3
:display:gsg:glgsg(debug): Binding texture  to color attachment.
:display:gsg:glgsg(debug): Binding texture  to color attachment.
:display:gsg:glgsg(debug): Binding texture sun to depth attachment.
:display:gsg:glgsg(debug): Creating color renderbuffer.
:display:gsg:glgsg(debug): Binding texture sun to depth attachment.
:display:gsg:glgsg(debug): Creating color renderbuffer.
:display:gsg:glgsg(debug): loading uncompressed texture _0
:display:gsg:glgsg(debug): loading new texture object for _0, 512 x 256 x 1, z = 0, mipmaps 1, uses_mipmaps = 0
:display:gsg:glgsg(debug): loading uncompressed texture _0
:display:gsg:glgsg(debug): updating image data of texture _0, 256 x 256 x 1, z = 0, mipmaps 1, uses_mipmaps = 0
Loading level level1
Playing one
:display:gsg:glgsg(debug): loading uncompressed texture _0
:display:gsg:glgsg(debug): loading new texture object for _0, 256 x 256 x 1, z = 0, mipmaps 1, uses_mipmaps = 0

Unfortunately, I am unable to work out how to use apitrace.

@rdb
Copy link
Owner

rdb commented Apr 25, 2019

I don't see p3d_Material.diffuse at all in the shader input reflection info in the log. That looks like a big red flag to me.

This is a shot in the dark, but I'd try opening assets/shader/lighting.frag in a text editor and changing the first line of this:

uniform struct {
  vec4 ambient;
  vec4 diffuse;
  vec3 specular;
  float roughness;
} p3d_Material;

to uniform struct p3d_MaterialParameters {.

@typewriter1
Copy link
Author

That did not solve the problem.

@rdb
Copy link
Owner

rdb commented May 14, 2019

Are you sure? Did you change it in the right place? I made that change on a computer that I reproduced the problem on, and it fixed the issue. Note that if you run it from source, there is at the moment (unfortunately) a duplicate shader in game/assets/shader/lighting.frag.

@typewriter1
Copy link
Author

Changing both shaders gave me an error on line 32, when accessing the value of p3d_Material.diffuse.

However, replacing it with this fixed the problem!

struct Material{
  vec4 ambient;
  vec4 diffuse;
  vec3 specular;
  float roughness;
};

uniform Material p3d_Material;

@rdb rdb closed this as completed in e8b0a44 May 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants