Shaders with HLSL #03: Passing Additional Parameters

In previous parts of this series, we briefly discussed the need for Shaders and created our first Shader Program. In this subsequent part, we would be exploring on passing additional parameters to our Custom Shader. In previous example, we replaced entire color of applied Control with a single color. What if we need to replace … Continue reading Shaders with HLSL #03: Passing Additional Parameters

Assignment using Ternary Operator

Couple of days back, I happened to come across a question in StackOverflow. Question seemed pretty straightforward, but at the same time, interesting. How would one use ternary operator for assignment. For example, how would write following code using ternary operator. Obviously, following wouldn't work. One way to use ternary operator would using Action. But … Continue reading Assignment using Ternary Operator

C# 8.0 : Default Implementation of Interface Members

The way C# language is evolving is definitely exciting and one feature that truly makes the wait for C# 8.0 all the more exciting is default implementation of interfaces. Since the onset, interfaces were behaviors characterized by member signatures, strictly disallowing any implementation. All that is going to change when C# 8.0 rolls out, as … Continue reading C# 8.0 : Default Implementation of Interface Members

Shaders with HLSL #02 : Applying Shader to WPF Application

In the first part of series, we wrote our first Shader Program. Now it is time to compile it so that we could use it in our WPF Application. HLSL Compiler To compile your HLSL code to a format that could be used with .Net WPF application, you would require the fxc compiler. For Windows … Continue reading Shaders with HLSL #02 : Applying Shader to WPF Application

Shaders with HLSL #01 : Shaders with HLSL for WPF Developers

Complete Tutorial Series Shaders with HLSL #01 : Introduction to Shaders and HLSL Shaders with HLSL #02 : Applying Shader to WPF¬†Application Shaders with HLSL #03 : Passing Additional Parameters In this first part of our tutorial, we will briefly enlighten ourselves on key concepts involving shaders and why it is required. We will also … Continue reading Shaders with HLSL #01 : Shaders with HLSL for WPF Developers

Early Exceptions for Iterator and async Methods

One of the first things you would need to be vary of while working with Iterator methods and async methods is exception handling. Both Iterator methods and async methods delay the execution of your code, right until you need the result, but it also results in delayed exceptions. Late Exception With Iterator Methods Let's consider … Continue reading Early Exceptions for Iterator and async Methods