Hello, recently I've been looking into shaders to make my project looks better but I found that shader is quite hard to get into. I picked GLSL to start and 've been watching some videos from "the art of code" where he performs some shader techniques in shadertoy. This feels like the easiest way to learn shader to me, but when I checked the shader files my Ogre project created, I found nothing similar to what I saw. Here's an example:
Code: Select all
#if 0
*** hlms_uv_count0 2
*** hlms_pose 0
*** uv_emissive 0
*** first_valid_detail_map_nm 4
*** fresnel_scalar 0
*** hlms_uv_count 1
*** uv_detail_nm1 0
*** uv_detail_nm2 0
*** areaLightMasks 1
*** BRDF_Default 1
*** set0_texture_slot_end 2
*** uv_specular 0
*** hlms_lights_area_approx 1
*** hlms_forwardplus_flipY 1
*** hlms_lights_directional 0
*** samplerStateStart 2
*** alpha_test 0
*** GGX_height_correlated 1
*** metallic_workflow 0
*** hw_gamma_write 1
*** uv_detail_weight 0
*** hlms_alpha_to_coverage 0
*** cubemaps_as_diffuse_gi 1
*** uv_detail_nm3 0
*** hlms_pose_normals 0
*** hlms_pose_half 0
*** hlms_lights_spot 1
*** GL_ARB_shading_language_420pack 1
*** uv_normal 0
*** hlms_alphablend 0
*** uv_detail3 0
*** normal_map 0
*** hlms_bones_per_vertex 3
*** uv_detail1 0
*** fresnel_workflow 0
*** perceptual_roughness 1
*** alpha_test_shadow_caster_only 0
*** materials_per_buffer 240
*** hw_gamma_read 1
*** hlms_skeleton 1
*** hlms_lights_point 1
*** GL_ARB_base_instance 1
*** s_lights_directional_non_caster 1
*** uv_detail0 0
*** uv_diffuse 0
*** uv_detail_nm0 0
*** hlms_render_depth_only 0
*** num_pass_const_buffers 3
*** uv_detail2 0
*** uv_roughness 0
*** receive_shadows 1
*** hlms_lights_area_tex_mask 1
*** clear_coat 0
*** needs_view_dir 1
*** set1_texture_slot_end 2
*** use_planar_reflections 0
*** hlms_normal 1
*** normal_weight 0
*** GL_ARB_texture_buffer_range 1
DONE DUMPING PROPERTIES
DONE DUMPING PIECES
#endif
There are vertex and pixel shader files (I'm assuming pixel is the same as fragment?) but there's no main function for them like I was told, so I figure the main function exists in a shader somewhere in Ogre.
I thought I was supposed to modify these shader files but looks like this is not the way so I have 2 questions:
1) How do I implement shaders into my project like mentioned here https://ogrecave.github.io/ogre-next/ap ... Components ? I did look into the postprocessing sample but this seems to be higher level (compositor) than what I'm trying to learn.
2) Any recommendations for shader learning resources? I'm not even sure I'm learning the right stuff to implement into Ogre right now.
(Sorry for this post being related to Ogre, but I thought it's more suited for this channel than the help channel)